Documentation ¶
Index ¶
- Variables
- func CodeBlock(lang string, s string) string
- func ErrorResponse(err error) *api.InteractionResponseData
- func GetBestGuildEmoji(guildID discord.GuildID, name ...string) string
- func RegisterCommand(command Command)
- func Response(format string, a ...any) *api.InteractionResponseData
- type Command
- type RedditCacheEntry
- type RedditData
- type RedditMedia
- type RedditMediaMetadata
- type RedditPost
- type RedditPostData
- type RedditResponse
- type RedditVideo
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandMap = make(map[string]Command)
Functions ¶
func ErrorResponse ¶
func ErrorResponse(err error) *api.InteractionResponseData
func RegisterCommand ¶
func RegisterCommand(command Command)
Types ¶
type Command ¶
type Command struct { Name string Guilds []discord.GuildID DiscordData api.CreateCommandData DiscordHandler cmdroute.CommandHandlerFunc }
type RedditCacheEntry ¶
type RedditCacheEntry struct {
// contains filtered or unexported fields
}
type RedditData ¶
type RedditData struct { After string `json:"after"` Dist int `json:"dist"` ModHash string `json:"modhash"` Posts []RedditPost `json:"children"` }
type RedditMedia ¶
type RedditMedia struct {
RedditVideo RedditVideo `json:"reddit_video"`
}
type RedditMediaMetadata ¶
type RedditPost ¶
type RedditPost struct { Kind string `json:"kind"` Data RedditPostData `json:"data"` }
type RedditPostData ¶
type RedditPostData struct { ID string `json:"id"` Subreddit string `json:"subreddit"` Title string `json:"title"` Selftext string `json:"selftext"` Author string `json:"author"` MediaMetadata map[string]RedditMediaMetadata `json:"media_metadata"` Media RedditMedia `json:"media"` Created float64 `json:"created"` Score int `json:"score"` Comments int `json:"num_comments"` DirectURL string `json:"url_overridden_by_dest"` URL string `json:"url"` Gallery bool `json:"is_gallery"` NSFW bool `json:"over_18"` Stickied bool `json:"stickied"` }
type RedditResponse ¶
type RedditVideo ¶
type RedditVideo struct { BitrateKbps int `json:"bitrate_kbps"` DashURL string `json:"dash_url"` Duration int `json:"duration"` FallbackURL string `json:"fallback_url"` HasAudio bool `json:"has_audio"` Height int `json:"height"` HlsURL string `json:"hls_url"` IsGif bool `json:"is_gif"` ScrubberMediaURL string `json:"scrubber_media_url"` TranscodingStatus string `json:"transcoding_status"` Width int `json:"width"` }
Click to show internal directories.
Click to hide internal directories.