aaaa
This commit is contained in:
parent
fc5d67a855
commit
a6db129a83
10
1.2.5/test
10
1.2.5/test
@ -1,10 +0,0 @@
|
||||
import schedule
|
||||
import time
|
||||
def test():
|
||||
print("deez")
|
||||
schedule.every(1).minutes.do(test)
|
||||
while 1 == 1:
|
||||
print("joe")
|
||||
time.sleep(5)
|
||||
schedule.run_pending()
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
[config]
|
||||
token = OTg2NDA4MjM3Njg5NjMwNzYx.Gn3sV3.af4MeWrAct-e6FyN6oDWt-QaOfOHuYBY97Vw7k
|
||||
replytobot = false
|
||||
|
||||
[modules]
|
||||
triggerbot = "true"
|
||||
quotebot = "true"
|
||||
70
1.2/bot.py
70
1.2/bot.py
@ -1,70 +0,0 @@
|
||||
import discord
|
||||
import time
|
||||
import configparser
|
||||
import random
|
||||
client = discord.Client()
|
||||
avgtimelst = []
|
||||
|
||||
|
||||
#loading config files
|
||||
botconf = configparser.ConfigParser()
|
||||
botconf.read("bot.conf")
|
||||
triggerbotconf = configparser.ConfigParser()
|
||||
triggerbotconf.read("triggerbot.conf")
|
||||
quotebotconf = configparser.ConfigParser()
|
||||
quotebotconf.read("quotebot.conf")
|
||||
|
||||
|
||||
#bot info
|
||||
@client.event
|
||||
async def on_ready():
|
||||
print('We have logged in as {0.user}'.format(client))
|
||||
|
||||
|
||||
#main event
|
||||
@client.event
|
||||
async def on_message(message):
|
||||
#defining variables
|
||||
msg = str(message.content)
|
||||
channel = str(message.channel.id)
|
||||
author = str(message.author)
|
||||
|
||||
#reply to bots
|
||||
if message.author.bot and botconf["config"]["replytobot"] == "false":
|
||||
return
|
||||
|
||||
#start event timer
|
||||
print("\n start client.event")
|
||||
start = time.time()
|
||||
|
||||
#triggerbot
|
||||
b = 0
|
||||
found = "false"
|
||||
triggersstr = (triggerbotconf["config"]["triggers"])
|
||||
triggers = triggersstr.split(",")
|
||||
print(triggers)
|
||||
print(type(triggers))
|
||||
while b < len(triggers) and found == "false":
|
||||
if triggers[b] not in msg:
|
||||
b = b+1
|
||||
elif triggers[b] in msg:
|
||||
print("balls")
|
||||
found = "true"
|
||||
await message.channel.send(triggerbotconfig["replys"][""])
|
||||
else:
|
||||
print("something happened")
|
||||
|
||||
#daily quote
|
||||
if channel == "1010042640508669982":
|
||||
print("weeee")
|
||||
|
||||
#end function timer
|
||||
end = time.time()
|
||||
eventime = (end - start)
|
||||
reventime = str(round(eventime,3))
|
||||
avgtimelst.append(float(reventime))
|
||||
avgtime = str(sum(avgtimelst) / len(avgtimelst))
|
||||
print("\n end client.event \n time: " + str(reventime) + "\n average time: " + avgtime)
|
||||
|
||||
|
||||
client.run(botconf["config"]["token"])
|
||||
@ -1,8 +0,0 @@
|
||||
[config]
|
||||
blacklist = ["1234567890","0987654321"] #blacklisted channels
|
||||
triggers = hello,hi,howdy,sup
|
||||
[replys] # add new replys as needed to respond custom triggers
|
||||
hello = ["hello","top of the morning m8"]
|
||||
hi = ["hi"]
|
||||
howdy = ["howdy"]
|
||||
sup = ["sup"]
|
||||
Loading…
Reference in New Issue
Block a user