game-discord-bot/app.py
2023-12-31 14:56:45 +01:00

22 lines
No EOL
491 B
Python

from config import config
import discord
intents = discord.Intents(messages=True)
client = discord.Client(intents=intents)
@client.event
async def on_ready():
print(f'We have logged in as {client.user}')
@client.event
async def on_message(message):
if message.author.name in config['bot']['whitelist']:
if message.content == 'info':
await message.channel.send('Hello!')
else:
print("user not authorized")
client.run(config['bot']['token'])