Skip to content

Commit 01380a4

Browse files
author
IOIIIO
committed
Add basic permissions, fix warnings in start
1 parent 2d37f0a commit 01380a4

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ token.txt
107107
owner.txt
108108
*.db
109109

110-
.vscode
110+
.vscode
111+
docs/

cogs/support/permissions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import discord
2+
3+
class Perm:
4+
def __init__(self):
5+
self.balance = 5
6+
return
7+
8+
def is_owner(self, ctx):
9+
if ctx.message.author.id in str(open("data/bot/owner.txt", "r").readline().split(",")):
10+
return True
11+
else:
12+
return False

start.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ def main(self):
99
failO = False
1010
self.resize(80,24)
1111
try:
12-
tkn = open("data/bot/token.txt","r").readline()
12+
open("data/bot/token.txt","r").readline()
1313
except:
1414
failT = True
1515
try:
16-
f = open("data/bot/owner.txt", "r").readline().split(",")
16+
open("data/bot/owner.txt", "r").readline().split(",")
1717
except:
1818
failO = True
1919
if failT or failO is not False:
@@ -118,7 +118,7 @@ def update(self):
118118
code = subprocess.call(("git", "pull", "--ff-only"))
119119
except FileNotFoundError:
120120
print("\nError: Git not found. It's either not installed or not in PATH.")
121-
return
121+
return
122122
if code == 0:
123123
print("\nUpdated successfully.")
124124
else:

0 commit comments

Comments
 (0)