tried to fix the sorting and hide the token bruh

This commit is contained in:
Honza 2024-03-12 18:40:14 +01:00
parent b8b0e50ecd
commit 955a52f218
2 changed files with 7 additions and 7 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ __pycache__/
# Sus bot data files
word_counts/
sus_bot_token.txt
# C extensions
*.so

View File

@ -62,7 +62,7 @@ async def count_reader(message): #returns message with counts
user = client.get_user(int(userid)) #needs to be where the client runs (main.py)
user_counts.append([user.name, usercount])
user_counts.append([user.name, int(usercount)])
user_counts.sort(key=lambda x:x[1])
@ -201,7 +201,7 @@ command_list['~count'] = Command('~count', ' --> Ask for word count of users:
slova = ["nigga", "negr", "debil", "gay", "kokot", "ok", "kurva", "sus", "petr", "gej", "bruh", "bružek"] #words bot recognize and count
sus_responses = ["it's getting sus here", "sus", "you are sussy", "sussy baka", "that is kinda sus", "that is sus"] #variety of responses when sus detection
sus_responses = ["it's getting sus here", "sus", "you are sussy", "sussy baka", "that is kinda sus", "that is sus", "you're seeming sus lately", "seems sus", "SUS", "gobus amogus", "amongsus", "sussy ah", "sussy"] #variety of responses when sus detection
greetings =['čau', 'ahoj', 'hi', 'hello', 'high', 'čauky', 'nazdar', 'dobrý den','helou'] #greetings which bot will reply to
@ -247,7 +247,7 @@ async def on_message(message):
if t_h + 30 < time.time():
if message.content.lower().startswith(g):
await message.channel.send('Hello')
print('Said Hello to:', message.author.name, '(id:', message.author.id,')')
print('Expressed greetings to:', message.author.name, '(id:', message.author.id,')')
t_h = time.time()
else:
pass
@ -260,7 +260,7 @@ async def on_message(message):
#
#sus easy function, not in functions_hub
if t_s + 20 < time.time():
if ('sus') in (message.content).lower(): #and message.content[0] != '~':
if ('sus') in (message.content).lower() and message.content[0] != '~':
await message.channel.send(sus_responses[random.randrange(0,len(sus_responses))])
print('Detected sus from:', message.author.name, '(id:', message.author.id, ')')
t_s = time.time()
@ -277,7 +277,6 @@ async def on_message(message):
#word counter, not in function hub
for slovo in slova:
if slovo in message.content.lower() and message.content[0] != '~':
msg_author_id = str(message.author.id)
@ -304,5 +303,5 @@ async def on_message(message):
pass
client.run("ODk2MzY0NDgxOTYwMTAzOTg2.Gez5r_.q63P7OdNebp2dpHYN7xFUiDLS1TtgpnrTns2O4")
TOKEN = open("sus_bot_token.txt")
client.run(TOKEN)