Documentation
¶
Overview ¶
Package interactions provides handlers for assignment actions (edit, update, delete).
Package interactions provides handlers for assignment list actions (add assignment).
Package interactions provides handlers for course config actions (update notify channel/role).
Package interactions provides handlers for the /assignments slash command.
Package interactions provides handlers for the /hakase slash command.
Index ¶
- Variables
- func AddAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate)
- func AddAssignmentSubmit(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func DeleteAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func SlashAssignments(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func SlashHakase(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func UpdateAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func UpdateAssignmentSubmit(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func UpdateNotifyChannel(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
- func UpdateNotifyRole(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, ...)
Constants ¶
This section is empty.
Variables ¶
var AssignmentsCommand = discordgo.ApplicationCommand{ Name: "assignments", Description: "configure assignments for due date notifications", Type: discordgo.ChatApplicationCommand, Options: []*discordgo.ApplicationCommandOption{ { Name: "id", Description: "retrieves assignment with this id", Type: discordgo.ApplicationCommandOptionInteger, }, }, }
var HakaseCommand = discordgo.ApplicationCommand{ Name: "hakase", Description: "course configuration", Type: discordgo.ChatApplicationCommand, Options: []*discordgo.ApplicationCommandOption{ { Name: "cmd", Description: "subcommand to execute", Type: discordgo.ApplicationCommandOptionString, Choices: []*discordgo.ApplicationCommandOptionChoice{ { Name: "rock-paper-scissors", Value: "rock-paper-scissors", }, { Name: "config", Value: "config", }, }, }, }, }
Functions ¶
func AddAssignment ¶
func AddAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate)
AddAssignment opens a modal for adding a new assignment via Discord interaction.
func AddAssignmentSubmit ¶
func AddAssignmentSubmit(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
AddAssignmentSubmit handles the submission of the add assignment modal and creates the assignment.
func DeleteAssignment ¶
func DeleteAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
DeleteAssignment deletes an assignment based on user interaction.
func SlashAssignments ¶
func SlashAssignments(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
SlashAssignments handles the /assignments slash command interaction. It retrieves a specific assignment or lists all assignments for the guild.
func SlashHakase ¶
func SlashHakase(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
SlashHakase handles the /hakase slash command interaction. It dispatches subcommands such as rock-paper-scissors and config.
func UpdateAssignment ¶
func UpdateAssignment(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
UpdateAssignment opens a modal for updating an assignment via Discord interaction.
func UpdateAssignmentSubmit ¶
func UpdateAssignmentSubmit(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
UpdateAssignmentSubmit handles the submission of the update assignment modal and updates the assignment.
func UpdateNotifyChannel ¶
func UpdateNotifyChannel(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
UpdateNotifyChannel updates the notifications channel for a course based on user interaction.
func UpdateNotifyRole ¶
func UpdateNotifyRole(bot *discordgo.Session, interactionCreate *discordgo.InteractionCreate, hakaseClient clients.HakaseClient)
UpdateNotifyRole updates the notifications role for a course based on user interaction.
Types ¶
This section is empty.