*COGS COGS COGS COG COGS COGS*

- Added GlobalSettings cog to allow extensions to access "global" settings
- Moved _info() to a separate cog
- added default on_ready() stuff
This commit is contained in:
0x5c
2019-10-04 13:10:27 -04:00
parent c8c2e80099
commit 0d7dc3853c
2 changed files with 50 additions and 9 deletions
+26
View File
@@ -0,0 +1,26 @@
"""
Info cog for qrm
---
"""
import discord
import discord.ext.commands as commands
class InfoCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.gs = bot.get_cog("GlobalSettings")
@commands.command(name="info", aliases=["about"])
async def _info(self, ctx):
"""Shows info about qrm."""
embed = discord.Embed(title="About qrm", description=self.gs.info.description, colour=self.gs.colours.neutral)
embed = embed.add_field(name="Authors", value=", ".join(self.gs.info.authors))
embed = embed.add_field(name="Contributing", value=self.gs.info.contributing)
embed = embed.add_field(name="License", value=self.gs.info.license)
await ctx.send(embed=embed)
def setup(bot):
bot.add_cog(InfoCog(bot))