Merge branch 'funcog'

- Local merge
This commit is contained in:
0x5c 2019-10-05 02:12:42 -04:00
commit cb8d4347e0
No known key found for this signature in database
GPG Key ID: CCE14303E194D25E
2 changed files with 51 additions and 0 deletions

50
cogs/funcog.py Normal file
View File

@ -0,0 +1,50 @@
"""
Fun cog for qrm
---
Copyright (C) 2019 Abigail Gold, 0x5c
This file is part of discord-qrmbot.
discord-qrmbot is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
import discord
import discord.ext.commands as commands
class FunCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.gs = bot.get_cog("GlobalSettings")
@commands.command(name="xkcd", aliases=['x'])
async def _xkcd(self, ctx, num : str):
'''Look up an xkcd by number.'''
await ctx.send('http://xkcd.com/' + num)
@commands.command(name="tar")
async def _tar(self, ctx):
'''Returns an xkcd about tar.'''
await ctx.send('http://xkcd.com/1168')
@commands.command(name="xd")
async def _xd(self, ctx):
'''ecks dee'''
await ctx.send('ECKS DEE :smirk:')
def setup(bot):
bot.add_cog(FunCog(bot))

View File

@ -82,6 +82,7 @@ async def _before_ensure_activity():
bot.add_cog(GlobalSettings(bot))
bot.load_extension("cogs.basecog")
bot.load_extension("cogs.morsecog")
bot.load_extension("cogs.funcog")
_ensure_activity.start()