diff --git a/.gitignore b/.gitignore index ccd00ab..cc0735f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__/ # Sus bot data files word_counts/ +sus_bot_token.txt # C extensions *.so diff --git a/bot_newest_version/susmain2_1.py b/bot_newest_version/susmain2_1.py index 79aa724..0c1c01f 100644 --- a/bot_newest_version/susmain2_1.py +++ b/bot_newest_version/susmain2_1.py @@ -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)