Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
[huggingmod] cleanup
Browse files
app.py
CHANGED
|
@@ -20,17 +20,12 @@ from pytz import timezone # for times
|
|
| 20 |
import asyncio # check if used
|
| 21 |
|
| 22 |
zurich_tz = timezone("Europe/Zurich")
|
|
|
|
|
|
|
| 23 |
|
| 24 |
def convert_to_timezone(dt, tz):
|
| 25 |
return dt.astimezone(tz).strftime("%Y-%m-%d %H:%M:%S %Z")
|
| 26 |
|
| 27 |
-
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 28 |
-
intents = discord.Intents.default()
|
| 29 |
-
intents.message_content = True
|
| 30 |
-
|
| 31 |
-
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 32 |
-
|
| 33 |
-
LOG_CHANNEL_ID =
|
| 34 |
|
| 35 |
#rate_limiter = RateLimiter(max_calls=10, period=60) # needs testing
|
| 36 |
|
|
@@ -177,6 +172,7 @@ async def on_voice_state_update(member, before, after):
|
|
| 177 |
|
| 178 |
# send messages
|
| 179 |
#
|
|
|
|
| 180 |
|
| 181 |
@bot.event
|
| 182 |
async def on_ready():
|
|
|
|
| 20 |
import asyncio # check if used
|
| 21 |
|
| 22 |
zurich_tz = timezone("Europe/Zurich")
|
| 23 |
+
bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())
|
| 24 |
+
|
| 25 |
|
| 26 |
def convert_to_timezone(dt, tz):
|
| 27 |
return dt.astimezone(tz).strftime("%Y-%m-%d %H:%M:%S %Z")
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
#rate_limiter = RateLimiter(max_calls=10, period=60) # needs testing
|
| 31 |
|
|
|
|
| 172 |
|
| 173 |
# send messages
|
| 174 |
#
|
| 175 |
+
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 176 |
|
| 177 |
@bot.event
|
| 178 |
async def on_ready():
|