Esempio n. 1
0
async def on_ready():
    log.info(f'Logged in as {bot.user.name} ({bot.user.id})')

    print(
        f'{bot.user.display_name} is in {len(bot.guilds)} guild(s) and ready for work!'
    )
    print('------')
Esempio n. 2
0
    def register(guild: discord.Guild, api_key: str):
        # Delete any existing entry for this server
        server = Servers.get(server_id=guild.id)
        if server:
            server.delete()

        Servers(server_id=guild.id, api_key=api_key)
        log.info(f'Registering API key for server {guild.name} ({guild.id})')
Esempio n. 3
0
async def on_guild_remove(guild: discord.Guild):
    log.info(f'Leaving guild {guild.name} ({guild.id})')
Esempio n. 4
0
async def on_guild_join(guild: discord.Guild):
    log.info(
        f'Joining guild {guild.name} ({guild.id}) with {guild.member_count} members'
    )