burp3
This commit is contained in:
parent
bdc8e5f36a
commit
eb38836c61
|
@ -0,0 +1,3 @@
|
|||
__pycache__/
|
||||
userdata/
|
||||
token.txt
|
|
@ -2,7 +2,10 @@ import queue
|
|||
import importlib
|
||||
import asyncio
|
||||
discordThread = importlib.import_module("discord-thread")
|
||||
discordThread.run("no")
|
||||
token = ""
|
||||
with open("token.txt") as f:
|
||||
token = f.read()
|
||||
discordThread.run(token)
|
||||
|
||||
def main():
|
||||
try:
|
||||
|
|
|
@ -6,6 +6,3 @@ observeDirectMessageChannels = true
|
|||
[lostMessageTracker]
|
||||
trackMessages = true
|
||||
acquireAllOnReconnect = true
|
||||
|
||||
[performance]
|
||||
loopTime = 0.1
|
|
@ -75,9 +75,6 @@ def readConfig():
|
|||
|
||||
global cObserveDirectMessageChannels
|
||||
cObserveDirectMessageChannels = stringToBool(config["default"]["observeDirectMessageChannels"])
|
||||
|
||||
global cLoopTime
|
||||
cLoopTime = float(config["performance"]["loopTime"])
|
||||
readConfig()
|
||||
|
||||
def shouldIgnoreChannel(channel):
|
||||
|
@ -160,6 +157,7 @@ class discordClient(threading.Thread):
|
|||
|
||||
async def acquireAllLostMessages(self):
|
||||
eprint("Acquiring lost messages...")
|
||||
with fetchMessageLock:
|
||||
for channel in self.getTrackedChannels():
|
||||
messageIDs = False
|
||||
with fileLock:
|
||||
|
@ -205,7 +203,7 @@ class discordClient(threading.Thread):
|
|||
async def on_message(self,message,tracked = False):
|
||||
if shouldIgnoreChannel(message.channel): return
|
||||
if tracked == False:
|
||||
with fileLock:
|
||||
with fetchMessageLock, fileLock:
|
||||
messageIDs = self.readChannelMessageIdFile(message.channel)
|
||||
if not str(message.id) in messageIDs:
|
||||
self.addToChannelMessageIdFile(message)
|
||||
|
|
Loading…
Reference in New Issue