diff --git a/cogs/general.py b/cogs/general.py index fa162b1..651bc2b 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -1,3 +1,4 @@ +from aiohttp import client_exceptions from discord.ext import commands import os import aiohttp @@ -56,6 +57,13 @@ class General(commands.Cog): await ctx.reply(f'could not fetch weather for {city}') except Exception as e: await ctx.reply(f'weather fetch failed: {e}') + + + @commands.command() + async def purge(self, ctx, amount: int): + if ctx.author.id != int(os.getenv('OWNER_ID')): + return + await ctx.channel.purge(limit=amount + 1) async def setup(bot): await bot.add_cog(General(bot)) diff --git a/credentials_test.env b/credentials_test.env index 35d519f..f8b46bc 100644 --- a/credentials_test.env +++ b/credentials_test.env @@ -1,3 +1,19 @@ -#this is where scary stuff where you put your credentials keys etc goes +#this is where scary stuff where you put your credentials keys etc goes -DISCORD_TOKEN="yo token here" \ No newline at end of file +DISCORD_TOKEN="yo token here" + +#telegram things +TELEGRAM_BOT_TOKEN="yo token here" +DISCORD_CHANNEL_ID="yo channel id for forwarding here" +DISCORD_WEBHOOK_URL="yo channel webhook here" +TELEGRAM_GROUP_ID="yo telegram group id here" + +#twitter things +TWITTER_RSS_URL="yo nitter id here" +TWITTER_DISCORD_WEBHOOK="yo discord twitter channel here" + +#strinova stats voice channel +STRINOVA_STAT_CHANNEL_ID="yo strinova stat channel here" + +#me (for purging and other owner only things) +OWNER_ID="your discord servers owner id here" \ No newline at end of file