Esempio n. 1
0
async def main():
    logging.basicConfig(level=logging.INFO)
    prefix = os.environ.get('BOT_PREFIX', 'r!')
    bot = Bot(
        command_prefix=when_mentioned_or(prefix),
        help_command=None,
        activity=Activity(type=ActivityType.playing, name=f'with roles | {prefix}help'),
    )
    bot.add_cog(CountryRoles(bot))
    bot.add_cog(BotInfo(bot))
    await bot.start(os.environ['DISCORD_TOKEN'])
Esempio n. 2
0
async def main():
    logging.basicConfig(level=logging.INFO)

    prefix = os.environ.get('BOT_PREFIX', 'g;')

    bot = Bot(
        command_prefix=when_mentioned_or(prefix),
        help_command=None,
        activity=Activity(type=ActivityType.watching,
                          name=f'for snippet links and {prefix}help'),
    )

    async with aiohttp.ClientSession() as session:
        bot.add_cog(BotInfo(bot))
        bot.add_cog(CodeSnippets(bot, session))
        bot.add_cog(RepoWidgets(bot, session))

        if 'TOP_GG_TOKEN' in os.environ:
            bot.add_cog(TopGG(bot))

        await bot.start(os.environ['DISCORD_TOKEN'])
Esempio n. 3
0
from discord import Activity, ActivityType
from discord.ext.commands import Bot, when_mentioned_or

from cogs.bot_info import BotInfo
from cogs.problems import Problems
from cogs.analytics import Analytics
from cogs.top_gg import TopGG

logging.basicConfig(level=logging.INFO)

prefix = '$'
if 'BOT_PREFIX' in os.environ:
    prefix = os.environ['BOT_PREFIX']

bot = Bot(command_prefix=when_mentioned_or(prefix),
          help_command=None,
          activity=Activity(type=ActivityType.watching,
                            name='you solve problems'))

bot.add_cog(BotInfo(bot))
bot.add_cog(Problems(bot))

if 'PRISMA_TOKEN' in os.environ:
    bot.add_cog(Analytics(bot))

if 'TOP_GG_TOKEN' in os.environ:
    bot.add_cog(TopGG(bot))

bot.run(os.environ['DISCORD_TOKEN'])
Esempio n. 4
0
from discord.ext.commands import Bot
import os
from cogs.bot_info import BotInfo
RIRIKSU = os.environ.get("RIRIKSU")
client = Bot(command_prefix=">")
"""
info = ">info"; i = ">i"; # bot info
search = ">search "; srch = ">sr "; # anime name search IMPLEMENTED
song = ">song ";s = ">s "; # choose song IMPLEMENTED
anime = ">anime ";a = ">a "; # choose anime IMPLEMENTED
currentanime = ">currentanime";ca = ">ca"; #current anime list IMPLEMENTED
currentsong = ">currentsong"; cs = ">cs"; #current song list IMPLEMENTED
getanime = ">getanime";ga = ">ga"; #get current chosen anime IMPLEMENTED
"""

client.add_cog(BotInfo(client))


@client.event
async def on_ready():
    print("Bot is ready.")


client.run(RIRIKSU)