added config file and tried to make loop
This commit is contained in:
parent
46065754ea
commit
16c847fe98
7
bot_newest_version/config.py
Normal file
7
bot_newest_version/config.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
slova = ["nigga", "negr", "debil", "gay", "kokot", "ok", "kurva", "sus", "petr", "gej", "bruh", "bružek"]
|
||||||
|
|
||||||
|
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']
|
||||||
|
|
||||||
|
main_channels_ids = ["1043499633118285825", "834034469152882729"]
|
@ -1,6 +1,6 @@
|
|||||||
import discord, time, random, os
|
import discord, time, random, os
|
||||||
from discord.ext import commands
|
from discord.ext import commands, tasks
|
||||||
|
from config import slova, sus_responses, greetings, main_channels_ids
|
||||||
|
|
||||||
t_h = 0
|
t_h = 0
|
||||||
t_s = 0
|
t_s = 0
|
||||||
@ -14,6 +14,13 @@ client = commands.Bot(command_prefix = '~', intents=intents)
|
|||||||
##############################################################################################################
|
##############################################################################################################
|
||||||
##################################### COMMNADS AND FUNCTIONS SCRIPTS #########################################
|
##################################### COMMNADS AND FUNCTIONS SCRIPTS #########################################
|
||||||
##############################################################################################################
|
##############################################################################################################
|
||||||
|
async def chat_participation(message): #randmonly sends messages into main channels
|
||||||
|
print("oiasndiuhsa iundhusia nhdoiusah iunasohndui sahndiu hasiduhnuiasodhna sdiyu nhasiudh niuashndiuahsniu dhniasuh")
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
async def word_counter(message): #counts words in word list
|
async def word_counter(message): #counts words in word list
|
||||||
for slovo in slova:
|
for slovo in slova:
|
||||||
if slovo in message.content.lower() and message.content[0] != '~':
|
if slovo in message.content.lower() and message.content[0] != '~':
|
||||||
@ -232,26 +239,26 @@ async def sus_function(message): #sus function
|
|||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
##############################################################################################################
|
|
||||||
##################################### FUNCTIONS AND COMMANDS HUB #############################################
|
|
||||||
##############################################################################################################
|
|
||||||
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", "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
|
|
||||||
##############################################################################################################
|
##############################################################################################################
|
||||||
##################################### RUNNING THE FUNCTIONS AND COMMANDS #####################################
|
##################################### RUNNING THE FUNCTIONS AND COMMANDS #####################################
|
||||||
##############################################################################################################
|
##############################################################################################################
|
||||||
|
@tasks.loop(seconds = 3)
|
||||||
|
async def myloop():
|
||||||
|
if random.randrange(0,10) == random.randrange(0,10):
|
||||||
|
for id in main_channels_ids:
|
||||||
|
channel = client.get_channel(id = id)
|
||||||
|
await channel.send(random.choice(sus_responses))
|
||||||
|
|
||||||
|
|
||||||
@client.event #ready message cmd
|
@client.event #ready message cmd
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print("Logged in as {0.user}".format(client))
|
print("Logged in as {0.user}".format(client))
|
||||||
|
myloop.start()
|
||||||
|
|
||||||
|
|
||||||
@client.event #on message actions
|
@client.event #on message actions
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if message.author == client.user:
|
if message.author == client.user or message.channel.id not in main_channels_ids:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|
||||||
@ -282,5 +289,7 @@ async def primenum(ctx):
|
|||||||
async def scprove(ctx):
|
async def scprove(ctx):
|
||||||
await scprove_command(ctx.message)
|
await scprove_command(ctx.message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TOKEN = open("../sus_bot_token.txt", 'r').read()
|
TOKEN = open("../sus_bot_token.txt", 'r').read()
|
||||||
client.run(TOKEN)
|
client.run(TOKEN)
|
||||||
|
Loading…
Reference in New Issue
Block a user