stable-diffuse-api #2

Merged
benjamyn merged 20 commits from stable-diffuse-api into master 2022-12-11 05:01:12 -05:00
Showing only changes of commit 1beadf61f3 - Show all commits

28
weeeabot.py Normal file
View File

@ -0,0 +1,28 @@
import discord
from sys import exit
try:
with open("token.secret", 'r') as f:
discord_client_token = f.read()
except FileNotFoundError:
print("Cannot locate token.secret please generate a token")
exit(69)
intents = discord.Intents.default()
intents.message_content = 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 == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
client.run(discord_client_token)