dasdasoihjdosa
This commit is contained in:
parent
82e35badba
commit
6e75260378
@ -14,7 +14,7 @@ client = commands.Bot(command_prefix = '~', intents=intents)
|
||||
##############################################################################################################
|
||||
##################################### COMMNADS AND FUNCTIONS SCRIPTS #########################################
|
||||
##############################################################################################################
|
||||
async def word_counter(message): #counts words in word list
|
||||
async def word_counter(message): #counts words in word list
|
||||
for slovo in slova:
|
||||
if slovo in message.content.lower() and message.content[0] != '~':
|
||||
|
||||
@ -48,6 +48,7 @@ async def word_counter(message): #counts words in word list
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
async def count_reader(message): #count command returns message with counts of certain word of all users
|
||||
message = message.message
|
||||
obsah = message.content.lower().split(' ')
|
||||
files = []
|
||||
user_counts = []
|
||||
@ -179,19 +180,8 @@ async def help_command(message): #help script
|
||||
embed.add_field(name="~scprove", value="Scientist will prove you anything: ~scprove <text here>", inline = True)
|
||||
embed.add_field(name="~primenum", value="Bot will tell you if number is a prime number", inline = True)
|
||||
embed.add_field(name="~count", value="Ask for word count of users: ~count <word>", inline = True)
|
||||
|
||||
return(embed)
|
||||
await message.channel.send("ahoj")
|
||||
|
||||
|
||||
# cc = ''
|
||||
# ff = ''
|
||||
# for C in command_list.values():
|
||||
# cc = cc + C.help_print()
|
||||
# for C in function_list.values():
|
||||
# ff = ff + C.help_print()
|
||||
# final_message = '**__Commands__:**\n' + cc + '**__Functions__:**\n' + ff
|
||||
# await message.channel.send(final_message)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
@ -239,46 +229,6 @@ async def sus_function(message): #sus function
|
||||
##################################### FUNCTIONS AND COMMANDS HUB #############################################
|
||||
##############################################################################################################
|
||||
|
||||
class Command:
|
||||
def __init__(self, caller, desc, script):
|
||||
self.caller = caller
|
||||
self.desc = desc
|
||||
self.script = script
|
||||
def help_print(self):
|
||||
return ('%s %s' % (self.caller, self.desc))
|
||||
|
||||
class Function:
|
||||
def __init__(self, caller, desc):
|
||||
self.caller = caller
|
||||
self.desc = desc
|
||||
def help_print(self):
|
||||
return ('%s %s' % (self.caller, self.desc))
|
||||
|
||||
|
||||
function_list = {}
|
||||
|
||||
|
||||
function_list['sus'] = Function(' sus', ' --> Bot knows when something is sus\n')
|
||||
|
||||
function_list['hello'] = Function(' greetings', ' --> Bot greets you back\n')
|
||||
|
||||
function_list['counter'] = Function(' word counter', ' --> Bot counts how many times you have written certain words')
|
||||
|
||||
command_list = {}
|
||||
|
||||
|
||||
command_list['~etime'] = Command('~etime', ' --> Command that will tell you epoch time\n', etime_command)
|
||||
|
||||
command_list['~help'] = Command('~help', ' --> Command that will show you this list\n', help_command)
|
||||
|
||||
command_list['~primenum'] = Command('~primenum', ' --> Bot will tell you if number is a prime number (number of six digits max.)\n', primenum_command)
|
||||
|
||||
command_list['~scprove'] = Command('~scprove', ' --> Scientist will prove you anything: |*~scprove <text here>*|\n', scprove_command)
|
||||
|
||||
command_list['~count'] = Command('~count', ' --> Ask for word count of users: |*~count <word>*|\n\n', count_reader)
|
||||
|
||||
|
||||
|
||||
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
|
||||
@ -308,37 +258,10 @@ async def on_message(message):
|
||||
|
||||
@client.command()
|
||||
async def count(ctx):
|
||||
await count_reader(ctx.message)
|
||||
await count_reader(ctx)
|
||||
|
||||
@client.command()
|
||||
async def help(ctx):
|
||||
await ctx.send(help_command(ctx.message))
|
||||
|
||||
@client.command()
|
||||
async def etime(ctx):
|
||||
await etime_command(ctx.message)
|
||||
|
||||
@client.command()
|
||||
async def primenum(ctx):
|
||||
await primenum_command(ctx.message)
|
||||
|
||||
@client.command()
|
||||
async def scprove(ctx):
|
||||
await scprove_command(ctx.message)
|
||||
|
||||
#accesing functions and commands hub to run commands
|
||||
# if message.content.startswith('~'):
|
||||
# for cmd in command_list.keys():
|
||||
# if message.content.lower().startswith(cmd):
|
||||
# c = command_list[cmd]
|
||||
# print(message.author.name, '(id:', message.author.id, ')', 'called',c.caller)
|
||||
# await c.script(message)
|
||||
# break
|
||||
#
|
||||
# else:
|
||||
# pass
|
||||
# else:
|
||||
# pass
|
||||
|
||||
TOKEN = open("../sus_bot_token.txt", 'r').read()
|
||||
client.run(TOKEN)
|
||||
|
Loading…
Reference in New Issue
Block a user