api

package
v0.0.0-...-003bd84 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBanned

func IsBanned(u *discordgo.User) bool

func IsDirectChannel

func IsDirectChannel(channel *discordgo.Channel) bool

TODO: caching

func IsOwner

func IsOwner(u *discordgo.User) bool

func IsTrusted

func IsTrusted(u *discordgo.User) bool

func PopulateRoles

func PopulateRoles()

Types

type Server

type Server struct {
	ID, Name string
}

func GetUserServers

func GetUserServers(userid string) []*Server

type Set

type Set map[int]map[string]bool

func (Set) Add

func (s Set) Add(discordid string, role int)

func (Set) Contains

func (s Set) Contains(discordid string, role int) bool

type User

type User struct {
	ID       string
	Username string
}

func GetUserFromID

func GetUserFromID(userid string) *User

func GetUserFromToken

func GetUserFromToken(token *oauth2.Token) *User

Jump to

Keyboard shortcuts

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