in discord.py, how do I make it so the bot only works on one? so is there a way do this
x = (channel id.)
if x == (12454431344645423) #this is the channel id
The easiest way is to just not add it to any other servers. You can also just leave all the servers but one in your on_ready
event, and then leave other servers as you join them.
import discord
client = discord.Client()
my_server = client.get_server('server id')
@client.event
async def on_ready():
for server in client.servers:
if server != my_server:
await client.leave_server(server)
@client.event
async def on_server_join(server):
if server != my_server:
await client.leave_server(server)