mirror of
https://git.squeakyrat.moe/faggot-chan/
synced 2026-11-04 18:35:45 +01:00
fixed death internet theory hardcoded for now
This commit is contained in:
1 parent
de2aa06119
commit
442dfae1b8
1 file changed
+16
@@ -52,6 +52,11 @@ client = discord.Client(intents=intents)
|
||||
|
||||
block_id = ["1000000000000003", "1000000000000004"] #fuck these two in particular
|
||||
|
||||
moralfag_id = "1000000000000002"
|
||||
moralfag_counter = 0
|
||||
moralfag_skip = False
|
||||
faglimit = 3 #ignore every x reply
|
||||
|
||||
last_server_message = 0.0 # unix timestamp of last message anyone sent in the server
|
||||
dm_sent = False
|
||||
interaction_count = 0
|
||||
@@ -383,6 +388,12 @@ async def on_message(message):
|
||||
if replied_to_bot:
|
||||
mentioned = True
|
||||
|
||||
if str(message.author.id) == moralfag_id:
|
||||
global moralfag_skip, moralfag_counter
|
||||
if moralfag_skip:
|
||||
moralfag_skip = False
|
||||
return
|
||||
|
||||
if not mentioned and random.random() > 0.05: #5% chance of replying if not mentiond
|
||||
return
|
||||
|
||||
@@ -404,6 +415,11 @@ async def on_message(message):
|
||||
await message.reply(result)
|
||||
print(f"[{timestamp()}] {message.author} said: {content}\n[{timestamp()}] Faggot-chan said: {result}")
|
||||
log_message(f"[{timestamp()}] {message.author} said: {content}\n[{timestamp()}] Faggot-chan said: {result}")
|
||||
if str(message.author.id) == moralfag_id:
|
||||
moralfag_counter += 1
|
||||
if moralfag_counter >= faglimit:
|
||||
moralfag_skip = True
|
||||
moralfag_counter = 0
|
||||
except Exception as e:
|
||||
await handle_error(f"[{timestamp()}] failed to send reply: {e}", notify_channel=message.channel)
|
||||
|
||||
|
||||
Reference in new issue
Block a user