made it ignore most channels
This commit is contained in:
parent
c880d98a8f
commit
1c50615bf3
14
rengobot.py
14
rengobot.py
@ -4,7 +4,6 @@ import time
|
||||
from datetime import datetime, timedelta
|
||||
import asyncio
|
||||
|
||||
#395277704007778325
|
||||
import sgfengine
|
||||
|
||||
import discord
|
||||
@ -27,6 +26,9 @@ admins=[ 756220448118669463, # Young Sun
|
||||
477895596141707264 # René
|
||||
]
|
||||
|
||||
awesome_server_id= 767835617002258443
|
||||
permitted_channel_ids= [ 875353143867752489, 885498819385634816, 878649716269785150, 881984021192671242]
|
||||
|
||||
white_stone= "<:white_stone:882731089548939314>"
|
||||
black_stone= "<:black_stone:882730888453046342>"
|
||||
|
||||
@ -39,6 +41,7 @@ format="%Y_%m_%d_%H_%M_%S_%f"
|
||||
|
||||
@bot.command()
|
||||
async def help(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
await ctx.send(
|
||||
'$help : shows this help\n\n'+
|
||||
|
||||
@ -58,6 +61,7 @@ async def help(ctx):
|
||||
|
||||
@bot.command()
|
||||
async def play(ctx, arg):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
guild= ctx.guild
|
||||
@ -135,6 +139,7 @@ async def play(ctx, arg):
|
||||
|
||||
@bot.command()
|
||||
async def edit(ctx, arg): #literally play but with less things
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
# It should wait until the queue has 4 players or so
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
@ -183,6 +188,7 @@ async def edit(ctx, arg): #literally play but with less things
|
||||
|
||||
@bot.command()
|
||||
async def board(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
guild= ctx.guild
|
||||
@ -211,6 +217,7 @@ async def board(ctx):
|
||||
|
||||
@bot.command()
|
||||
async def join(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
|
||||
@ -241,6 +248,7 @@ async def join(ctx):
|
||||
|
||||
@bot.command()
|
||||
async def leave(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
|
||||
@ -271,6 +279,7 @@ async def leave(ctx):
|
||||
|
||||
@bot.command()
|
||||
async def queue(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
channel= bot.get_channel(channel_id) # thonk the order
|
||||
guild = channel.guild
|
||||
@ -344,11 +353,13 @@ async def queue(ctx):
|
||||
|
||||
@bot.command()
|
||||
async def sgf(ctx):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
file = discord.File(str(ctx.channel.id)+".sgf")
|
||||
await ctx.send(file=file)
|
||||
|
||||
@bot.command()
|
||||
async def newgame(ctx, arg):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
|
||||
@ -380,6 +391,7 @@ async def newgame(ctx, arg):
|
||||
|
||||
@bot.command()
|
||||
async def resign(ctx, arg):
|
||||
if ctx.guild.id == awesome_server_id and ctx.channel.id not in permitted_channel_ids: return
|
||||
channel_id= ctx.channel.id
|
||||
user = ctx.author
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user