Added main.py to set up the base starting
This commit is contained in:
24
main.py
Normal file
24
main.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import os, discord, logging
|
||||
from dotenv import load_dotenv
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
LOGGER = logging.getLogger('botmafieux')
|
||||
LOGGER.setLevel(logging.DEBUG)
|
||||
handler = logging.FileHandler(filename='botmafieux.log', encoding='utf-8', mode='w')
|
||||
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
||||
LOGGER.addHandler(handler)
|
||||
|
||||
bot_intents = discord.Intents.default()
|
||||
bot_intents.message_content = True
|
||||
bot_intents.members = True
|
||||
bot_intents.presences = True
|
||||
bot_intents.guilds = True
|
||||
bot_intents.reactions = True
|
||||
|
||||
bot = discord.Client(command_prefix='$',intents=bot_intents)
|
||||
|
||||
if __name__ == '__main__':
|
||||
load_dotenv()
|
||||
TOKEN = os.getenv('TOKEN')
|
||||
bot.run(TOKEN)
|
||||
|
||||
Reference in New Issue
Block a user