Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,6 @@ def convert_to_timezone(dt, tz):
|
|
24 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
25 |
intents = discord.Intents.all()
|
26 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
27 |
-
bot.log_channel = bot.get_channel(1036960509586587689)
|
28 |
-
print(bot.log_channel)
|
29 |
test = Client("https://lunarflu-bert-test.hf.space/--replicas/58fjw/")
|
30 |
|
31 |
#rate_limiter = RateLimiter(max_calls=10, period=60) # needs testing
|
@@ -41,6 +39,8 @@ async def on_message(message):
|
|
41 |
if message.author != bot.user:
|
42 |
lunarflu = bot.get_user(811235357663297546) #811235357663297546
|
43 |
cakiki = bot.get_user(416019758492680203)
|
|
|
|
|
44 |
|
45 |
"""Backup"""
|
46 |
number_of_messages = number_of_messages + 1
|
@@ -94,7 +94,7 @@ async def on_message(message):
|
|
94 |
if test_server == 'False':
|
95 |
alert = "<@&1108342563628404747>" # normal @alerts role
|
96 |
|
97 |
-
await
|
98 |
f"[EXPERIMENTAL ALERT] {message.author} may be posting too quickly! \n"
|
99 |
f"Spam count: {user_cooldowns[message.author.id]['count']}\n"
|
100 |
f"Message content: {message.content}\n"
|
@@ -387,8 +387,7 @@ async def check_github():
|
|
387 |
@bot.event
|
388 |
async def on_ready():
|
389 |
print('Logged on as', bot.user)
|
390 |
-
|
391 |
-
print(log_channel)
|
392 |
|
393 |
|
394 |
|
|
|
24 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
25 |
intents = discord.Intents.all()
|
26 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
|
|
|
|
27 |
test = Client("https://lunarflu-bert-test.hf.space/--replicas/58fjw/")
|
28 |
|
29 |
#rate_limiter = RateLimiter(max_calls=10, period=60) # needs testing
|
|
|
39 |
if message.author != bot.user:
|
40 |
lunarflu = bot.get_user(811235357663297546) #811235357663297546
|
41 |
cakiki = bot.get_user(416019758492680203)
|
42 |
+
log_channel = bot.get_channel(1036960509586587689)
|
43 |
+
print(log_channel)
|
44 |
|
45 |
"""Backup"""
|
46 |
number_of_messages = number_of_messages + 1
|
|
|
94 |
if test_server == 'False':
|
95 |
alert = "<@&1108342563628404747>" # normal @alerts role
|
96 |
|
97 |
+
await log_channel.send(
|
98 |
f"[EXPERIMENTAL ALERT] {message.author} may be posting too quickly! \n"
|
99 |
f"Spam count: {user_cooldowns[message.author.id]['count']}\n"
|
100 |
f"Message content: {message.content}\n"
|
|
|
387 |
@bot.event
|
388 |
async def on_ready():
|
389 |
print('Logged on as', bot.user)
|
390 |
+
|
|
|
391 |
|
392 |
|
393 |
|