utility

package
v0.0.0-...-e28099a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChannelExists

func ChannelExists(connection *discordgo.Session, guildID string, channelID string) (bool, error)

ChannelExists checks whether a channel exists in a guild using the channel ID.

func HasPermission

func HasPermission(connection *discordgo.Session, userID string, channelID string, permissions ...int) (bool, error)

HasPermission is a helper function to check whether a user has the required permissions.

func HasPermissionOr

func HasPermissionOr(connection *discordgo.Session, userID string, channelID string, permissions ...int) (bool, error)

HasPermissionOr is a helper function to check whether a user has a required permission. This performs the same checks as HasPermission but is an OR function rather than AND

func IsBotHigher

func IsBotHigher(connection *discordgo.Session, guildID string, userID string) (bool, error)

IsBotHigher checks whether the bot has a higher role than the user to moderate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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