Code: Select all
import discum
import time
botID = 824119071556763668
guildID = 1186040951794307073
channelID = 1309665693997862912
token = "token"
bot = discum.Client(token=token, log=True)
def send_glist_command():
try:
data = {
"name": "glist",
"type": 1,
}
bot.triggerSlashCommand(botID, channelID, guildID=guildID, data=data)
print("Sent '/glist' command.")
except Exception as e:
print(f"Error sending '/glist' command: {e}")
def start_bot(resp):
if resp.event.ready:
print("Bot is ready!")
while True:
send_glist_command()
time.sleep(60)
bot.gateway.command(func=start_bot)
bot.gateway.run()
Ich kenne Discum nicht wirklich, also ist das genau das, was ich als erstes damit gemacht habe