interactions

package
v0.0.0-...-7c89717 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2025 License: MPL-2.0 Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
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,
		},
	},
}
View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址