Skip to content
Snippets Groups Projects
strolly.py 734 B
Newer Older
  • Learn to ignore specific revisions
  • import os
    
    import discord
    from discord.ext import commands
    from dotenv import load_dotenv
    
    
    Dennis Klein's avatar
    Dennis Klein committed
    from armin import Armin
    from leaderboard import Leaderboard
    
    from poll_cog import PollCog
    
    dnns01's avatar
    dnns01 committed
    from roll_cog import RollCog
    
    
    # .env file is necessary in the same directory, that contains several strings.
    load_dotenv()
    TOKEN = os.getenv('DISCORD_TOKEN')
    ACTIVITY = os.getenv('DISCORD_ACTIVITY')
    
    intents = discord.Intents.default()
    intents.members = True
    bot = commands.Bot(command_prefix='!', help_command=None, activity=discord.Game(ACTIVITY), intents=intents)
    bot.add_cog(PollCog(bot))
    
    dnns01's avatar
    dnns01 committed
    bot.add_cog(RollCog(bot))
    
    bot.add_cog(Leaderboard(bot))
    
    Dennis Klein's avatar
    Dennis Klein committed
    bot.add_cog(Armin(bot))
    
    
    
    @bot.event
    async def on_ready():
        print("Client started!")