mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
add invite command
This commit is contained in:
parent
c5c6e7ef24
commit
f44b106b60
2 changed files with 29 additions and 0 deletions
28
cogs/meta.py
Normal file
28
cogs/meta.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
|
||||
class Meta:
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.command(aliases=['inv'])
|
||||
async def invite(self, context):
|
||||
"""Gives you a link to add me to your server."""
|
||||
permissions = discord.Permissions()
|
||||
permissions.update(**dict.fromkeys((
|
||||
'read_messages',
|
||||
'send_messages',
|
||||
'add_reactions',
|
||||
'external_emojis',
|
||||
'manage_emojis',
|
||||
'embed_links',
|
||||
), True))
|
||||
|
||||
await context.send('<%s>' % discord.utils.oauth_url(self.bot.user.id, permissions))
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Meta(bot))
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
'cogs': (
|
||||
'cogs.emote',
|
||||
'cogs.meta',
|
||||
'ben_cogs.debug',
|
||||
'ben_cogs.misc',
|
||||
'ben_cogs.debug'
|
||||
|
|
Loading…
Reference in a new issue