Python Forum

Full Version: Not able to add multiple channel IDs to python bot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have my bot setup so that it can ping a user in a specific channel when they join the server then immediately delete it, and it works:

command_prefix: "!"
# in seconds
delay_before_ping: 1
ghost_ping_channel: 899392291607822380 << that's the channel ID that I want the bot to post in

The issue I'm having:



When I try to add multiple channel IDs, it simply doesn't work. Am not very familiar with python, how could I add another channel ID? Using (), ", ', and other seperators doesn't seem to work. ID: ID seemed to work at first but gave me a list of errors and crashed the script when run.



New to python so really unsure what to do. Looked it up online however I may be using incorrect terminology as the information doesn't pop up.

NOTE: this is a config script to configure what channels the command runs in. The command works fine, but I'm having trouble configuring it.
thats not how python work.
(Oct-17-2021, 10:50 PM)Underscore Wrote: [ -> ]thats not how python work.

Bit confused, could you explain which part of what I was doing was incorrect or giving some context to which section of this I'm misexplaining?
Likely you'll want to use a loop and loop through the various IDs. For example:

CHANNEL_IDS = [899392291607822380, 900403391607822380, (etc)]

for channel_id in CHANNEL_IDs:
    ghost_ping_channel: channel_id   # This command looks weird to me.  Are you sure this is the proper command????