Documentation
¶
Overview ¶
Discord用のbotsクライアントです.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MessageEmbedStyle_default ¶
func MessageEmbedStyle_default(msg *proto.BotMsg, message *discordgo.MessageCreate) (sends []*discordgo.MessageSend)
デフォルトのMessageEmbedStyleです.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Discordの一つのセッションに対処するインスタンスです.
func (*Instance) SetUnaryService ¶
func (instance *Instance) SetUnaryService(bots *lib.BotsHandler, config UnaryServiceConfig)
Instanceに新しいUnaryServiceを設定します.
type MessagePreprocessor ¶
テキストチャットでメッセージを受けとったときに実行される関数です. matchは対処を必要とするかどうかを表します. cmdは実行されるコマンド名を表します. argは実行されるコマンドに引き渡すInput構造体を表します.
func Preprocessor_prefix ¶
func Preprocessor_prefix(prefix string) MessagePreprocessor
特定のPrefixに反応するMessagePreprocessorを返します.
type MessageStyle ¶
type MessageStyle func(pb_out *proto.BotMsg, message_data *discordgo.MessageCreate) (message []*discordgo.MessageSend)
BotMsgとmessageのデータからmessageを作る関数を表します.
type UnaryServiceConfig ¶
1メッセージ1レスポンスのサービスを表します
func NewUnaryServiceConfig ¶
func NewUnaryServiceConfig(preprocessor MessagePreprocessor, style MessageStyle) (config UnaryServiceConfig)
メッセージを返すようなUnaryServiceを返します.
Click to show internal directories.
Click to hide internal directories.