discord

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntegrationActionType_SendMessage    domain.IntegrationActionType = "send_message"
	IntegrationActionType_SendEmbed      domain.IntegrationActionType = "send_embed"
	IntegrationActionType_SendFile       domain.IntegrationActionType = "send_file"
	IntegrationActionType_SendReply      domain.IntegrationActionType = "send_reply"
	IntegrationActionType_SendReaction   domain.IntegrationActionType = "send_reaction"
	IntegrationActionType_GetChannels    domain.IntegrationActionType = "get_channels"
	IntegrationActionType_GetMessages    domain.IntegrationActionType = "get_messages"
	IntegrationActionType_GetMessageByID domain.IntegrationActionType = "get_message_by_id"
	IntegrationActionType_DeleteMessage  domain.IntegrationActionType = "delete_message"

	IntegrationTriggerType_MessageReceived domain.IntegrationTriggerEventType = "message_received"
)
View Source
const (
	DiscordIntegrationPeekable_Guilds   domain.IntegrationPeekableType = "guilds"
	DiscordIntegrationPeekable_Channels domain.IntegrationPeekableType = "channels"
)
View Source
const DiscordEpoch int64 = 1420070400000

Variables

View Source
var (
	Schema = schema
)

Functions

func NewDiscordIntegrationCreator

func NewDiscordIntegrationCreator(deps domain.IntegrationDeps) domain.IntegrationCreator

func NewDiscordPollingHandler

func NewDiscordPollingHandler(deps domain.IntegrationDeps) domain.IntegrationPoller

Types

type DeleteMessageParams

type DeleteMessageParams struct {
	CredentialID string `json:"credential_id"`
	ChannelID    string `json:"channel_id"`
	MessageID    string `json:"message_id"`
}

type DiscordConnectionTester

type DiscordConnectionTester struct {
	// contains filtered or unexported fields
}

func (*DiscordConnectionTester) TestConnection

func (c *DiscordConnectionTester) TestConnection(ctx context.Context, params domain.TestConnectionParams) (bool, error)

type DiscordCredential

type DiscordCredential struct {
	Token string `json:"token"`
}

type DiscordIntegration

type DiscordIntegration struct {
	// contains filtered or unexported fields
}

func (*DiscordIntegration) DeleteMessage

func (i *DiscordIntegration) DeleteMessage(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)

func (*DiscordIntegration) Execute

func (*DiscordIntegration) GetMessageByID

func (i *DiscordIntegration) GetMessageByID(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)

func (*DiscordIntegration) GetMessages

func (i *DiscordIntegration) GetMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)

func (*DiscordIntegration) Peek

func (*DiscordIntegration) PeekChannels

func (*DiscordIntegration) PeekGuilds

func (*DiscordIntegration) SendMessages

func (i *DiscordIntegration) SendMessages(ctx context.Context, params domain.IntegrationInput, item domain.Item) (domain.Item, error)

type DiscordIntegrationCreator

type DiscordIntegrationCreator struct {
	// contains filtered or unexported fields
}

func (*DiscordIntegrationCreator) CreateIntegration

type DiscordIntegrationCreatorDeps

type DiscordIntegrationCreatorDeps struct {
	ParameterBinder  domain.IntegrationParameterBinder
	CredentialGetter domain.CredentialGetter[DiscordCredential]
}

type DiscordIntegrationDependencies

type DiscordIntegrationDependencies struct {
	ParameterBinder  domain.IntegrationParameterBinder
	CredentialID     string
	CredentialGetter domain.CredentialGetter[DiscordCredential]
}

type DiscordPollingHandler

type DiscordPollingHandler struct {
	// contains filtered or unexported fields
}

func (*DiscordPollingHandler) HandlePollingEvent

func (*DiscordPollingHandler) PollChannelMessages

func (i *DiscordPollingHandler) PollChannelMessages(ctx context.Context, p domain.PollingEvent, discordSession *discordgo.Session) (domain.PollResult, error)

type GetMessageByIDParams

type GetMessageByIDParams struct {
	CredentialID string `json:"credential_id"`
	ChannelID    string `json:"channel_id"`
	MessageID    string `json:"message_id"`
}

type GetMessagesParams

type GetMessagesParams struct {
	CredentialID string `json:"credential_id"`
	ChannelID    string `json:"channel_id"`
	MaxAmount    string `json:"amount"`
	BeforeID     string `json:"before_id"`
	AfterID      string `json:"after_id"`
}

type PeekChannelsParams

type PeekChannelsParams struct {
	GuildID string `json:"guild_id"`
}

type SendMessageParams

type SendMessageParams struct {
	CredentialID string `json:"credential_id"`
	ChannelID    string `json:"channel_id"`
	Content      string `json:"content"`
}

Jump to

Keyboard shortcuts

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