open-source-at-illinois / discord-bot

Did someone ask for a token?
0 stars 0 forks source link

Integrate webhooks #2

Open benthayer opened 4 years ago

benthayer commented 4 years ago

Add endpoints to the discord bot's script so we can send a message based off of a post request.

One example is send a message when people join/leave the zoom call

benthayer commented 4 years ago

Relevant resources: https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/participant-joined-meeting https://marketplace.zoom.us/docs/guides/build/webhook-only-app https://github.com/bwmarrin/discordgo/blob/master/structs.go

Parse the JSON from that the webhook, get the payload.object.participant.user_name You'll need the line dg.ChannelMessageSend(channelId, user + "joined the server")