WIP: Add UpdateChecker cog #14

Draft
cswimr wants to merge 37 commits from updatechecker into main
Showing only changes of commit 9a7b627854 - Show all commits

View file

@ -80,6 +80,7 @@ class UpdateChecker(commands.Cog):
data = await self.conf.all() data = await self.conf.all()
repos = data["repos"] repos = data["repos"]
channel = data["gochannel"] channel = data["gochannel"]
auto = data["auto"]
use_embed = data["embed"] use_embed = data["embed"]
whitelist = data["whitelist"] whitelist = data["whitelist"]
blacklist = data["blacklist"] blacklist = data["blacklist"]
@ -308,7 +309,7 @@ class UpdateChecker(commands.Cog):
channel = await self.conf.gochannel() channel = await self.conf.gochannel()
embed = await self.conf.embed() embed = await self.conf.embed()
if embed: if embed:
e = discord.Embed(title="Update Checker settings", color=0x00FF00) e = discord.Embed(title="Update Checker Settings", color=0x00FF00)
e.add_field(name="Automatic Cog Updates", value=str(auto)) e.add_field(name="Automatic Cog Updates", value=str(auto))
if channel == 0: if channel == 0:
channel = "Direct Messages" channel = "Direct Messages"
@ -443,7 +444,7 @@ class UpdateChecker(commands.Cog):
except asyncio.exceptions.InvalidStateError: except asyncio.exceptions.InvalidStateError:
message += " No error has been encountered." message += " No error has been encountered."
else: else:
message += f" An error has been encountered. Please run `{ctx.prefix}cogupdater task error` and report it to SeaswimmerTheFsh (.seasw) on the help server." message += f" An error has been encountered. Please run `{ctx.prefix}cogupdater task error` and report it to SeaswimmerTheFsh (seasw.) on the help server."
await ctx.send(message) await ctx.send(message)
@_group_update_task.command() @_group_update_task.command()