22 lines
463 B
Python
22 lines
463 B
Python
import json
|
|
from typing import List
|
|
|
|
import discord
|
|
from discord.ext import commands
|
|
|
|
OWNER = json.load(open("exts/cfg.json"))["ReplOwners"]
|
|
|
|
|
|
def is_owner() -> bool:
|
|
def predicate(ctx: commands.Context):
|
|
return ctx.author.id in OWNER
|
|
|
|
return commands.check(predicate)
|
|
|
|
|
|
def guild_specific(guilds: List[discord.Object]) -> bool:
|
|
def predicate(ctx: commands.Context):
|
|
return ctx.guild.id in guilds
|
|
|
|
return commands.check(predicate)
|