qrm2/cogs/funcog.py

37 lines
882 B
Python
Raw Normal View History

2019-10-04 20:19:31 -04:00
"""
Fun cog for qrm
---
2019-10-05 02:23:11 -04:00
Copyright (C) 2019 Abigail Gold, 0x5c
2019-10-04 20:19:31 -04:00
2019-10-05 02:23:11 -04:00
This file is part of discord-qrmbot and is released under the terms of the GNU
General Public License, version 2.
2019-10-04 20:19:31 -04:00
"""
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))