add invite command

pull/1/head
qwewqa 4 years ago
parent 016859897f
commit 6c8aec3a08
  1. 2
      main.py
  2. 7
      miyu_bot/commands/cogs/utility.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)

@ -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))

Loading…
Cancel
Save