Skip to content

Commit

Permalink
Moved default settings to Guild.py instead of settings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Brady committed Oct 21, 2021
1 parent c1e8da9 commit 5eb7c33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
8 changes: 0 additions & 8 deletions src/Data/Settings.json

This file was deleted.

14 changes: 6 additions & 8 deletions src/Modules/Guilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
Guilds = {}

class Guild:
rEnabled:bool; "Repost Filtering Enabled?"
rDelete:bool; "Reposts Should Be Deleted?"
rTimeout:int; "Time in seconds for a post to be too old"
rThreshold:int; "Repost Threshold"
rChannels:List[int]; "The list of channels for reposts to be captured"
rDetected_msg:List[str]; "The list of recently deleted messages"
rEnabled:bool = True
rDelete:bool = True
rTimeout:int = 604800
rThreshold:int = 10
rChannels:List[int] = [864282912631291905]
rDetected_msg:List[str] = ["> {AUTHOR},You seem to have posted a repost"]

def __init__(self, ID):
Log.debug(f"Guild {ID} retrieved")
Expand All @@ -33,8 +33,6 @@ def __init__(self, ID):
if Settings:
self.LoadJSON(Settings[0])
else:
with open(SETTINGS_STORE) as fObj:
self.LoadJSON(fObj.read())
with conn:
conn.execute(
"Insert into GUILDS values(?,?);",
Expand Down

0 comments on commit 5eb7c33

Please sign in to comment.