From 6c8aec3a0892b453b014561cf51b07548eab5dfa Mon Sep 17 00:00:00 2001 From: qwewqa <198e559dbd446d973355f415bdfa34@gmail.com> Date: Fri, 15 Jan 2021 23:19:40 -0500 Subject: [PATCH] add invite command --- main.py | 2 +- miyu_bot/commands/cogs/utility.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 6697e61..7808760 100644 --- a/main.py +++ b/main.py @@ -27,7 +27,7 @@ bot.load_extension('miyu_bot.commands.cogs.utility') @bot.event async def on_ready(): logging.getLogger(__name__).info(f'Current server count: {len(bot.guilds)}') - await bot.change_presence(activity=discord.Game(name='test')) + await bot.change_presence(activity=discord.Game(name='https://discord.gg/TThMwrAZTR')) bot.run(bot_token) diff --git a/miyu_bot/commands/cogs/utility.py b/miyu_bot/commands/cogs/utility.py index d2e6a4f..e1c5a4a 100644 --- a/miyu_bot/commands/cogs/utility.py +++ b/miyu_bot/commands/cogs/utility.py @@ -20,6 +20,13 @@ class Utility(commands.Cog): async def similarity_score(self, ctx: commands.Context, source: str, target: str): await ctx.send(str(FuzzyMatcher().score(romanize(source), romanize(target)))) + @commands.command(name='invite', + aliases=[], + description='Sends the bot invite.', + help='!invite') + async def invite(self, ctx: commands.Context): + await ctx.send('https://discord.com/api/oauth2/authorize?client_id=789314370999287808&permissions=388160&scope=bot') + def setup(bot): bot.add_cog(Utility(bot))