moderation

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = &bot.Module{
	Name:        "moderation",
	Description: "",
	GuildOnly:   true,
	Commands: map[string]*bot.Command{
		"ban": {},
		"kick": {
			Description: "Kick a user from the server with an optional warning message.",
			Usage:       "<User> [Message]",
			Example:     "@Robbbbbbb \"Get out!\"",
			Permissions: []string{permissionKick},
			Execute:     kick,
		},
		"mute": {
			Description: "Mutes a user, making unable to speak or send messages.",
			Usage:       "<User> [Duration]",
			Example:     "@Robbbbbbb 1h",
			Permissions: []string{permissionMute},
			Execute:     mute,
		},
		"unmute": {
			Description: "Unmute a user.",
			Usage:       "<User>",
			Example:     "@Robbbbbbb",
			Permissions: []string{permissionMute},
			Execute:     unmute,
		},
	},
	Store: &store.Store{
		Tables: []*store.Table{
			{
				Name: "moderation_muted_roles",
				Columns: []*store.Column{
					{
						Name:  "guild",
						Type:  "VARCHAR",
						Len:   32,
						Flags: []store.SQLFlag{store.SQLFlagNotNull, store.SQLFlagUnique},
					},
					{
						Name:  "role",
						Type:  "VARCHAR",
						Len:   32,
						Flags: []store.SQLFlag{store.SQLFlagNotNull},
					},
				},
			},
			{
				Name: "moderation_muted_users",
				Columns: []*store.Column{
					{
						Name:  "guild",
						Type:  "VARCHAR",
						Len:   32,
						Flags: []store.SQLFlag{store.SQLFlagNotNull},
					},
					{
						Name:  "user",
						Type:  "VARCHAR",
						Len:   32,
						Flags: []store.SQLFlag{store.SQLFlagNotNull},
					},
					{
						Name:  "until",
						Type:  "BIGINT",
						Flags: []store.SQLFlag{store.SQLFlagNotNull},
					},
				},
			},
		},
	},
}

Module moderation provides moderation commands and utils

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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