diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..13b5ad2 Binary files /dev/null and b/.DS_Store differ diff --git a/extensions/general.py b/extensions/general.py new file mode 100644 index 0000000..af85d65 --- /dev/null +++ b/extensions/general.py @@ -0,0 +1,32 @@ +import discord +import subprocess +from discord.ext import commands +import random + +# Basic commands a bot should have: + +class General(commands.Cog): + def __init__(self, bot): + self.bot = bot + + # Version command, takes the Revision from last commit and shows it as the revision # + @commands.command(description='Get the current bot version', aliases=['ver', 'version', 'info']) + async def about(self, ctx): + try: + ver = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip() + await ctx.send("DarK`BoT by Codi-Hacks rev: " + ver) + except Exception: + await ctx.send("DarK`BoT by Codi-Hacks") + + #Say command, it echoes whatever you tell it + @commands.command() + async def say(self, ctx): + message = ctx.message.clean_content + final = message.split(' ', 1)[1] + try: + await ctx.send(final) + except: + await ctx.send("Please Give Some Message!") + +def setup(bot): + bot.add_cog(General(bot)) \ No newline at end of file