forked from qwertyquerty/ChessBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.py
More file actions
46 lines (39 loc) · 1.11 KB
/
Copy pathcommand.py
File metadata and controls
46 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import discord
import chess
import db
import config
from config import *
from util import *
import random
import psutil
import datetime
import time
import traceback
import ctypes
import os
import math
import sys
from io import StringIO
import gc
class Command():
name = "command"
flags = FLAG_NONE
level = LEVEL_EVERYONE
aliases = []
enabled = True
helpstring = ["{prefix}command", "runs the command"]
@classmethod
async def call(self,ctx):
if ctx.user.level < self.level:
await ctx.ch.send("You do not have permission to run this command!")
return
if self.flags & FLAG_MUST_BE_IN_GAME and not ctx.game:
await ctx.ch.send('You are not in a game! Make one with `{prefix}newgame [mention]`'.format(prefix=ctx.prefix))
return
if self.flags & FLAG_MUST_BE_SERVER_OWNER and ctx.mem != ctx.guild.owner:
await ctx.ch.send("You must be the server owner to do this!")
return
await self.run(ctx)
@classmethod
async def run(self,ctx):
pass