rolesmodule

package
v0.0.0-...-025a0c4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRoleByNameOrPing

func GetRoleByNameOrPing(role string, info *bot.GuildInfo) (*discordgo.Role, error)

GetRoleByNameOrPing gets a role by its name or by pinging it

func GetUserAssignableRole

func GetUserAssignableRole(role string, info *bot.GuildInfo) (*discordgo.Role, error)

GetUserAssignableRole gets a role by it's name, but only if it's user-assignable

Types

type RolesModule

type RolesModule struct {
}

RolesModule contains commands for manipulating user-assignable roles.

func New

func New() *RolesModule

New RolesModule

func (*RolesModule) Commands

func (w *RolesModule) Commands() []bot.Command

Commands in the module

func (*RolesModule) Description

func (w *RolesModule) Description(info *bot.GuildInfo) string

Description of the module

func (*RolesModule) Name

func (w *RolesModule) Name() string

Name of the module

func (*RolesModule) OnGuildRoleDelete

func (w *RolesModule) OnGuildRoleDelete(info *bot.GuildInfo, r *discordgo.GuildRoleDelete)

OnGuildRoleDelete keeps things tidy by making sure no deleted roles are user-assignable

Jump to

Keyboard shortcuts

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