@bot.command(pass_context=True) async def ping(ctx): channels_to_send = ["1234567890", "234567890"] for channel_id in channels_to_send: channel = bot.get_channel(channel_id) await bot.send_message(channel, "Pong")