discord

package
v0.0.0-...-53546a6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Endpoint = oauth2.Endpoint{
	AuthURL:   "https://discord.com/api/oauth2/authorize",
	TokenURL:  "https://discord.com/api/oauth2/token",
	AuthStyle: oauth2.AuthStyleInParams,
}
View Source
var RED_ALERT = 0x961e13
View Source
var YELLOW_ALERT = 0xf2c94c

Functions

func GQLInputToGo

func GQLInputToGo(discordChannels []*modelInputs.DiscordChannelInput) []*model.DiscordChannel

func OAuth

func OAuth(ctx context.Context, code string) (*oauth2.Token, error)

Types

type Bot

type Bot struct {
	Session *discordgo.Session
	GuildID string
}

func NewDiscordBot

func NewDiscordBot(guildId string) (*Bot, error)

func (*Bot) CreateChannel

func (bot *Bot) CreateChannel(name string) (*discordgo.Channel, error)

func (*Bot) GetChannels

func (bot *Bot) GetChannels() ([]*discordgo.Channel, error)

func (*Bot) SendErrorAlert

func (bot *Bot) SendErrorAlert(channelId string, payload integrations.ErrorAlertPayload) error

func (*Bot) SendErrorFeedbackAlert

func (bot *Bot) SendErrorFeedbackAlert(channelId string, payload integrations.ErrorFeedbackAlertPayload) error

func (*Bot) SendLogAlert

func (bot *Bot) SendLogAlert(channelId string, payload integrations.LogAlertPayload) error

func (*Bot) SendMetricMonitorAlert

func (bot *Bot) SendMetricMonitorAlert(channelId string, payload integrations.MetricMonitorAlertPayload) error

func (*Bot) SendNewSessionAlert

func (bot *Bot) SendNewSessionAlert(channelId string, payload integrations.NewSessionAlertPayload) error

func (*Bot) SendNewUserAlert

func (bot *Bot) SendNewUserAlert(channelId string, payload integrations.NewUserAlertPayload) error

func (*Bot) SendRageClicksAlert

func (bot *Bot) SendRageClicksAlert(channelId string, payload integrations.RageClicksAlertPayload) error

func (*Bot) SendTrackPropertiesAlert

func (bot *Bot) SendTrackPropertiesAlert(channelId string, payload integrations.TrackPropertiesAlertPayload) error

func (*Bot) SendUserPropertiesAlert

func (bot *Bot) SendUserPropertiesAlert(channelId string, payload integrations.UserPropertiesAlertPayload) error

Jump to

Keyboard shortcuts

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