diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index a22f730..77d971c 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -80,7 +80,7 @@ class MsG: await ctx.trigger_typing() await ctx.send('✅ ' + ctx.message.author.mention + ' **Probable match:**\n' + scraper.check_match('http://iqdb.harry.lu/?url=' + url)) except exc.MatchError: - await ctx.send('❌ ' + ctx.message.author.mention + ' **No probable match.**') + await ctx.send('❌ ' + ctx.message.author.mention + ' **No probable match.**', delete_after=10) except Exception: await ctx.send(exc.base) traceback.print_exc(limit=1) diff --git a/src/main/cogs/tools.py b/src/main/cogs/tools.py index 93ccf0c..146eef7 100644 --- a/src/main/cogs/tools.py +++ b/src/main/cogs/tools.py @@ -45,14 +45,13 @@ class Utils: @commands.group(name=',send', aliases=[',s'], hidden=True) @commands.is_owner() + @checks.del_ctx() async def send(self, ctx): pass @send.command(name='guild', aliases=['g', 'server', 's']) - @checks.del_ctx() async def send_guild(self, ctx, guild, channel, *message): await discord.utils.get(self.bot.get_all_channels(), guild__name=guild, name=channel).send(formatter.tostring(message)) @send.command(name='user', aliases=['u', 'member', 'm']) - @checks.del_ctx() async def send_user(self, ctx, user, *message): await discord.utils.get(self.bot.get_all_members(), id=int(user)).send(formatter.tostring(message)) diff --git a/src/main/run.py b/src/main/run.py index f2705e1..bd19697 100644 --- a/src/main/run.py +++ b/src/main/run.py @@ -24,15 +24,15 @@ bot = commands.Bot(command_prefix=commands.when_mentioned_or(config['prefix']), @bot.event async def on_ready(): if isinstance(bot.get_channel(config['startup_channel']), discord.TextChannel): - await bot.get_channel(config['startup_channel']).send('H3l1(0) hOw aR3? **H4VE dAy.** 🌈') + await bot.get_channel(config['startup_channel']).send('H3l1(0) hOw aR3? **H4vE dAy.** 🌈') print('Connected.') print('Username: ' + bot.user.name) print('-------') # Close connection to Discord - immediate offline @bot.command(name=',die', aliases=[',d', ',close', ',kill'], brief='Kills the bot', description='BOT OWNER ONLY\nCloses the connection to Discord', hidden=True) -@checks.del_ctx() @commands.is_owner() +@checks.del_ctx() async def die(ctx): try: await bot.get_channel(config['shutdown_channel']).send('Am g0 by3e333333eee. **H4v3 n1GhT.** 💤') @@ -45,8 +45,8 @@ async def die(ctx): # Invite bot to bot owner's server @bot.command(name=',invite', aliases=[',inv', ',link'], brief='Invite the bot', description='BOT OWNER ONLY\nInvite the bot to a server (Requires admin)', hidden=True) -@checks.del_ctx() @commands.is_owner() +@checks.del_ctx() async def invite(ctx): try: await ctx.send('🔗 https://discordapp.com/oauth2/authorize?&client_id=' + str(config['client_id']) + '&scope=bot&permissions=' + str(config['permissions'])) @@ -57,7 +57,7 @@ async def invite(ctx): @bot.command(brief='[IN TESTING]', description='[IN TESTING]', hidden=True) async def hi(ctx): try: - hello = 'Hello, ' + ctx.message.author.mention + '.' + hello = 'Hewwo, ' + ctx.message.author.mention + '.' if ctx.message.author.id == checks.owner_id: hello += '.. ***Master.*** uwu' elif ctx.message.author.guild_permissions.administrator: @@ -70,9 +70,15 @@ async def hi(ctx): traceback.print_exc(limit=1) @bot.command(hidden=True) +@commands.is_owner() @checks.del_ctx() async def test(ctx): - pass + embed = discord.Embed(title='Title', type='rich', description='Description.', url='https://static1.e621.net/data/4b/3e/4b3ec0c2e8580f418e4ce019dfd5ac32.png', color=discord.Color.from_rgb(255, 255, 255)) + embed = embed.set_image('https://static1.e621.net/data/27/0f/270fd28caa5e6d8bf542a76515848e02.png') + embed = embed.set_footer('Footer') + embed = embed.set_author('Author') + embed = embed.set_thumbnail('https://cdn.discordapp.com/attachments/353251794161500163/357707620561453077/9d803ea3-b7fa-401f-89cf-f32cf21fe772.png') + ctx.send('Embed test', embed=embed) bot.add_cog(info.Info(bot)) bot.add_cog(tools.Utils(bot))