added "ea" array to config file, restricted a command to users in that list or bot owners

This commit is contained in:
Sakimori 2021-07-23 18:32:36 -04:00
parent 47b0d4033f
commit c3c700d242

View file

@ -983,6 +983,9 @@ class LeagueSetPlayerModifiersCommand(Command):
template = "m;setplayermods [league name]\n[team name]\n[player name]\n4 numbers, seperated by a space, for batting pitching baserunning defense" template = "m;setplayermods [league name]\n[team name]\n[player name]\n4 numbers, seperated by a space, for batting pitching baserunning defense"
description = "Set a pack of modifiers to a specific player in your league. Commissioners only." description = "Set a pack of modifiers to a specific player in your league. Commissioners only."
def isauthorized(self, user):
return user.id in config()["owners"] + config()["ea"]
async def execute(self, msg, command, flags): async def execute(self, msg, command, flags):
if league_exists(command.split("\n")[0].strip()): if league_exists(command.split("\n")[0].strip()):
try: try:
@ -1702,6 +1705,9 @@ def config():
"owners" : [ "owners" : [
0000 0000
], ],
"ea" : [
0000
],
"prefix" : ["m;", "m!"], "prefix" : ["m;", "m!"],
"simmadome_url" : "", "simmadome_url" : "",
"soulscream channel id" : 0, "soulscream channel id" : 0,