0

I'm looking into hosting an academic event in Discord. I need a bot that can check the presence of the enrolled in each activity, an activity being to watch seminars and alike through discord screensharing, so the adm team can have a secure track (if possible, with user email) of who can be awarded a certificate of participation. Would you know anything of this kind? Be it a ready-to-use bot or a source code. The question is sadly wide, I'd like suggestions of any approaches that you could know. (Edited)

Danielvisky
  • 41
  • 2
  • 7
  • 1
    Are you wanting it to check a text channel or a voice channel? Also have you tried anything yet to do this? – duckboycool May 19 '20 at 21:06
  • Voice channels, mainly the participations in webinars as I now edited in the question. I've checked log bots, but am yet to find one that logs entrance in screenshare, if it's even possible. Also I'm looking for something more organized than the usual logs of such bots. – Danielvisky May 20 '20 at 00:20

1 Answers1

0

It'll depend on exactly what you want, but here's something that should help if you're wanting to use discord.py.

import discord

client = discord.Client()

@client.event
async def on_ready():
    vc = client.get_channel(id) #get the id of the voice channel
    attend = vc.members

This will set attend to a list of members who were in the VC when you run the script. From there, you can do what you want with the list. For example, you could save a list of users' names to a file with this.

f = open('Attendees.txt', 'w')
f.write('\n'.join([user.name for user in attend]))
duckboycool
  • 2,425
  • 2
  • 8
  • 23