Documentation ¶
Index ¶
- Variables
- func AlphaRole(guildID string) string
- func Emoji(emojiCode string) string
- func FanboxRole(guildID string) string
- func FormerRole(guildID string) string
- func Get(c context.Context) models.Config
- func IsModmailChannel(ds *discordgo.Session, guildID, channelID string) bool
- func LoadConfig() error
- func LogChannel(guildID string) string
- func MessageLink(msg *discordgo.Message) string
- func ModmailCategory(guildID string) string
- func MuteRole(guildID string) string
- func NativeEmoji(emojiCode string) string
- func Now() time.Time
- func ParseTime(raw string) time.Time
- func PrintDate(t time.Time) string
- func PrintTime(t time.Time) string
- func RoleGrantIsEnabled(guildID string) bool
- func RoleRemoveIsEnabled(guildID string) bool
- func SetAlphaRole(guildID, roleID string) error
- func SetCopyPipeline(cp CopyPipeline) error
- func SetDoubleTLEnabled(enabled bool) error
- func SetEightBallEnabled(enabled bool) error
- func SetFanboxRole(guildID, roleID string) error
- func SetFormerRole(guildID, roleID string) error
- func SetMuteRole(guildID, roleID string) error
- func SetRoleGrantEnabled(guildID string, enabled bool) error
- func SetRoleRemoveEnabled(guildID string, enabled bool) error
- func SetSpecialRole(guildID, roleID string) error
- func SetSyncSheet(guildID, sheetID string) error
- func SetTweetSyncSinceID(handle, channelID string, sinceID int64) error
- func SetWhaleRole(guildID, roleID string) error
- func SpecialRole(guildID string) string
- func SyncSheet(guildID string) string
- func UpdateConfig(update bson.M) error
- func WhaleRole(guildID string) string
- type BotConfig
- type CopyPipeline
- type Extraction
- type RoleConfig
- type TweetSyncConfig
- type TweetUpdate
- type YoutubeCredential
Constants ¶
This section is empty.
Variables ¶
View Source
var CopyPipelines = []CopyPipeline{}
View Source
var CreatorID = "204752740503650304"
View Source
var DateFormat string
View Source
var DoubleTL = false
View Source
var EightBallEnabled bool
View Source
var ErrorChannel = "793361959046217778"
View Source
var Extractions = make(map[string]Extraction)
View Source
var GoogleClientID string
View Source
var GoogleCredentials bson.M
View Source
var GoogleCredentialsAlt1 bson.M
View Source
var GoogleOauthCredentials bson.M
View Source
var GoogleSecret string
View Source
var GrantRoles = map[string]RoleConfig{
"755437328515989564": {
Alpha: "760705266953355295",
Special: "783112023570513970",
Whale: "761570574794489886",
Fanbox: "",
Former: "782479385185615953",
},
}
View Source
var Loc *time.Location
View Source
var LogChannels = map[string]string{
"755437328515989564": "772322798546321428",
}
View Source
var ModeratorRoles = map[string][]string{
"755437328515989564": {
"755623281238867980",
"775181732864852048",
"778288741504516096",
"775667196969877504",
"755788358994755664",
"770268062871715850",
"770266890882383912",
"770040458666836049",
},
}
View Source
var ModmailCategories = map[string]string{
"755437328515989564": "779849308525690900",
}
View Source
var Proposals = make(map[string]string)
View Source
var RoleGrantEnabled = map[string]bool{}
View Source
var RoleRemoveEnabled = map[string]bool{}
View Source
var StaffRoles = map[string][]string{
"755437328515989564": {
"755623281238867980",
"775181732864852048",
"778288741504516096",
"775667196969877504",
"755788358994755664",
"770268062871715850",
"770266890882383912",
"770040458666836049",
},
}
View Source
var SyncSheets = map[string]string{}
View Source
var TimeFormat string
View Source
var TweetSyncChannels = []TweetSyncConfig{}
View Source
var TweetUpdates = make(map[string]TweetUpdate)
View Source
var YoutubeCredentials []YoutubeCredential
Functions ¶
func FanboxRole ¶
FanboxRole get the designated Fanbox role for the given guild
func FormerRole ¶
FormerRole get the designated former member role for the given guild
func IsModmailChannel ¶
func LoadConfig ¶
func LoadConfig() error
func LogChannel ¶
LogChannel get the designated log channel for the given guild
func MessageLink ¶
func ModmailCategory ¶
ModmailCategory get the designated modmail category ID for the given guild
func NativeEmoji ¶
func RoleGrantIsEnabled ¶
RoleGrantIsEnabled Return whether syncing is enabled for the given guild
func RoleRemoveIsEnabled ¶
RoleRemoveIsEnabled Return whether syncing is enabled for the given guild
func SetAlphaRole ¶
func SetCopyPipeline ¶
func SetCopyPipeline(cp CopyPipeline) error
func SetDoubleTLEnabled ¶
func SetEightBallEnabled ¶
func SetFanboxRole ¶
func SetFormerRole ¶
func SetMuteRole ¶
func SetRoleGrantEnabled ¶
func SetRoleRemoveEnabled ¶
func SetSpecialRole ¶
func SetSyncSheet ¶
func SetTweetSyncSinceID ¶
func SetWhaleRole ¶
func SpecialRole ¶
SpecialRole get the designated special role for the given guild
func UpdateConfig ¶
Types ¶
type BotConfig ¶
type BotConfig struct { ModeratorRoles map[string][]string `json:"moderator_roles" bson:"moderator_roles"` StaffRoles map[string][]string `json:"staff_roles" bson:"staff_roles"` GrantRoles map[string]RoleConfig `json:"grant_roles" bson:"grant_roles"` SyncSheets map[string]string `json:"sync_sheets" bson:"sync_sheets"` RoleGrantEnabled map[string]bool `json:"role_grant_enabled" bson:"role_grant_enabled"` RoleRemoveEnabled map[string]bool `json:"role_remove_enabled" bson:"role_remove_enabled"` TimeFormat string `json:"time_format" bson:"time_format"` DateFormat string `json:"date_format" bson:"date_format"` GoogleCredentials bson.M `json:"-" bson:"google_credentials"` GoogleCredentialsAlt1 bson.M `json:"-" bson:"google_credentials_alt1"` GoogleOauthCredentials bson.M `json:"-" bson:"google_oauth_credentials"` GoogleClientID string `json:"-" bson:"google_client_id"` GoogleSecret string `json:"-" bson:"google_secret"` YoutubeCredentials []YoutubeCredential `json:"-" bson:"youtube_credentials"` EightBallEnabled bool `json:"eight_ball_enabled" bson:"eight_ball_enabled"` TweetSyncChannels []TweetSyncConfig `json:"tweet_sync_channels" bson:"tweet_sync_channels"` CopyPipelines []CopyPipeline `json:"copy_pipelines" bson:"copy_pipelines"` DoubleTL bool `json:"double_tl" bson:"double_tl"` }
type CopyPipeline ¶
type CopyPipeline struct { OID bson.ObjectId `json:"_id" bson:"_id,omitempty"` CreatedAt time.Time `json:"created_at" bson:"created_at"` CreatedBy string `json:"created_by" bson:"created_by"` CreatedByName string `json:"created_by_name" bson:"created_by_name"` Type string `json:"type" bson:"type"` ChannelID string `json:"channel_id" bson:"channel_id"` Prefix string `json:"prefix" bson:"prefix"` YoutubeVideoID string `json:"youtube_video_id" bson:"youtube_video_id"` YoutubeVideoTitle string `json:"youtube_video_title" bson:"youtube_video_title"` YoutubeLivechatID string `json:"youtube_livechat_id" bson:"youtube_livechat_id"` }
func GetCopyPipeline ¶
func GetCopyPipeline(channelID, videoID string) *CopyPipeline
func GetCopyPipelines ¶
func GetCopyPipelines(channelID string) []CopyPipeline
func RemoveCopyPipeline ¶
func RemoveCopyPipeline(channelID string) ([]CopyPipeline, error)
type Extraction ¶
type RoleConfig ¶
type TweetSyncConfig ¶
type TweetSyncConfig struct { Handle string `json:"handle" bson:"handle"` ChannelID string `json:"channel_id" bson:"channel_id"` ControlChannelID string `json:"control_channel_id" bson:"control_channel_id"` SinceID int64 `json:"since_id" bson:"since_id"` }
func MaybeGetTweetConfig ¶
func MaybeGetTweetConfig(channelID string) *TweetSyncConfig
type TweetUpdate ¶
type TweetUpdate struct { ChannelID string `json:"channel_id" bson:"channel_id"` UserMessageID string `json:"user_message_id" bson:"user_message_id"` BotMessageID string `json:"bot_message_id" bson:"bot_message_id"` TweetMessageID string `json:"tweet_message_id" bson:"tweet_message_id"` Translation string `json:"translation" bson:"translation"` Translator string `json:"translator" bson:"translator"` }
type YoutubeCredential ¶
Click to show internal directories.
Click to hide internal directories.