-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·50 lines (39 loc) · 1.21 KB
/
Copy pathmain.py
File metadata and controls
executable file
·50 lines (39 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/python3
import discord
from discord.ext import commands
from random import randint, choice, shuffle, sample
import math
import sys
from sys import argv
from cmath import cos
from os import environ
import json
import datetime
from resources import words5, wordleClass
from requests import get
description = """An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here."""
intents = discord.Intents.default()
intents.members = True
intents.message_content = True
bot = commands.Bot(command_prefix="!", description=description, intents=intents)
client = discord.Client(intents=intents)
import Andrebot
import asyncio
@bot.event
async def on_ready():
print(f"Logged in as {bot.user} (ID: {bot.user.id})")
await bot.change_presence(activity=discord.Game("Votando 13"))
print("------")
andrebot = Andrebot.Andrebot(bot.command, platform='dsc')
asyncio.run(andrebot.create_functions())
# @bot.command()
# async def mine(ctx):
# await ctx.send(f"{server.status().players.online} players playing")
try:
BOT_TOKEN = environ["BOT_TOKEN"]
except KeyError:
print("No BOT_TOKEN env var provided")
sys.exit()
bot.run(BOT_TOKEN)