diff --git a/cogs/owner.py b/cogs/owner.py index 885d4c1d0..15cd791e6 100644 --- a/cogs/owner.py +++ b/cogs/owner.py @@ -128,7 +128,7 @@ class Owner: await self.bot.say("I was unable to unload some cogs: " "{}".format(still_loaded)) else: - await self.bot.say("All cogs are now unloaded.") + await self.bot.say("All cogs are now unloaded.") @checks.is_owner() @commands.command(name="reload") @@ -462,6 +462,35 @@ class Owner: else: break + @commands.command(pass_context=True) + async def contact(self, ctx, *, message : str): + """Sends message to the owner""" + if settings.owner == "id_here": + await self.bot.say("I have no owner set.") + return + owner = discord.utils.get(self.bot.get_all_members(), id=settings.owner) + author = ctx.message.author + sender = "From {} ({}):\n\n".format(author, author.id) + message = sender + message + try: + await self.bot.send_message(owner, message) + except discord.errors.InvalidArgument: + await self.bot.say("I cannot send your message, I'm unable to find" + "my owner... *sigh*") + except discord.errors.HTTPException: + await self.bot.say("Your message is too long.") + except: + await self.bot.say("I'm unable to deliver your message. Sorry.") + + @commands.command() + async def info(self): + """Shows info about Red""" + await self.bot.say( + "This is an instance of Red, an open source Discord bot created by " + "Twentysix and improved by many.\n\n**Github:**\n" + "\n" + "**Official server:**\n") + async def leave_confirmation(self, server, owner, ctx): if not ctx.message.channel.is_private: current_server = ctx.message.server @@ -564,4 +593,4 @@ def check_files(): def setup(bot): check_files() n = Owner(bot) - bot.add_cog(n) \ No newline at end of file + bot.add_cog(n)