Im using discord API in python to manage a Discord bot. This command creates a list of people in a certain discord channel.
I have a function:
async def attendance(ctx, channel):
# code here that creates a variable with member names
await bot.say(printdiscordnames)
I want to call the above function each time with a different channel name in a list
So I would do:
async def attendanceall(ctx):
channel_list = ['voice1', 'voice2', 'voice3']
for item in channel_list:
attendance(item)
Basically I want to do !attendanceall in discord and it will do the first function which makes a list and prints it in discord for each channel in the list.
My issue is I dont know how to call the first function for each channel name in the list.