discord

package
v0.0.0-...-979f385 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerSetting

type ControllerSetting struct {
	Hostname string
	Port     int
	// contains filtered or unexported fields
}

ControllerSetting Settings

type Discord

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

Discord is Automated CS:GO/get5 BOT. 外部のDBなどを使わずに動くため、永続化したいのであればFirebaseなどのクライアントへ保存することを推奨 discord implements all of EventHandler, Database, MatchLoader, DemoUploader.

func NewDiscord

func NewDiscord(ctx context.Context, token string, setting ControllerSetting) (*Discord, error)

NewDiscord Get discord pointer

func (*Discord) CheckDemoAuth

func (d *Discord) CheckDemoAuth(ctx context.Context, mid string, filename string, mapNumber int, serverID string, auth string) error

CheckDemoAuth implements got5.JWTAuth

func (*Discord) CheckEventAuth

func (*Discord) CheckEventAuth(ctx context.Context, mid string, reqAuth string) error

CheckEventAuth implements got5.EventHandler

func (*Discord) Close

func (d *Discord) Close() error

Close implements got5.EventHandler

func (*Discord) EventAuth

func (d *Discord) EventAuth(ctx context.Context, mid string, auth string) error

EventAuth

func (*Discord) HandleOnBackupRestore

func (d *Discord) HandleOnBackupRestore(ctx context.Context, p got5.OnBackupRestorePayload) error

HandleOnBackupRestore implements got5.EventHandler

func (*Discord) HandleOnBombDefused

func (d *Discord) HandleOnBombDefused(ctx context.Context, p got5.OnBombDefusedPayload) error

HandleOnBombDefused implements got5.EventHandler

func (*Discord) HandleOnBombExploded

func (d *Discord) HandleOnBombExploded(ctx context.Context, p got5.OnBombExplodedPayload) error

HandleOnBombExploded implements got5.EventHandler

func (*Discord) HandleOnBombPlanted

func (d *Discord) HandleOnBombPlanted(ctx context.Context, p got5.OnBombPlantedPayload) error

HandleOnBombPlanted implements got5.EventHandler

func (*Discord) HandleOnDecoyStarted

func (d *Discord) HandleOnDecoyStarted(ctx context.Context, p got5.OnDecoyStartedPayload) error

HandleOnDecoyStarted implements got5.EventHandler

func (*Discord) HandleOnDemoFinished

func (d *Discord) HandleOnDemoFinished(ctx context.Context, p got5.OnDemoFinishedPayload) error

HandleOnDemoFinished implements got5.EventHandler

func (*Discord) HandleOnDemoUploadEnded

func (d *Discord) HandleOnDemoUploadEnded(ctx context.Context, p got5.OnDemoUploadEndedPayload) error

HandleOnDemoUploadEnded implements got5.EventHandler

func (*Discord) HandleOnEvent

func (d *Discord) HandleOnEvent(ctx context.Context, p got5.OnEventPayload) error

HandleOnEvent implements got5.EventHandler

func (*Discord) HandleOnFlashbangDetonated

func (d *Discord) HandleOnFlashbangDetonated(ctx context.Context, p got5.OnFlashbangDetonatedPayload) error

HandleOnFlashbangDetonated implements got5.EventHandler

func (*Discord) HandleOnGameStateChanged

func (d *Discord) HandleOnGameStateChanged(ctx context.Context, p got5.OnGameStateChangedPayload) error

HandleOnGameStateChanged implements got5.EventHandler

func (*Discord) HandleOnGoingLive

func (d *Discord) HandleOnGoingLive(ctx context.Context, p got5.OnGoingLivePayload) error

HandleOnGoingLive implements got5.EventHandler

func (*Discord) HandleOnGrenadeThrown

func (d *Discord) HandleOnGrenadeThrown(ctx context.Context, p got5.OnGrenadeThrownPayload) error

HandleOnGrenadeThrown implements got5.EventHandler

func (*Discord) HandleOnHEGrenadeDetonated

func (d *Discord) HandleOnHEGrenadeDetonated(ctx context.Context, p got5.OnHEGrenadeDetonatedPayload) error

HandleOnHEGrenadeDetonated implements got5.EventHandler

func (*Discord) HandleOnKnifeRoundStarted

func (d *Discord) HandleOnKnifeRoundStarted(ctx context.Context, p got5.OnKnifeRoundStartedPayload) error

HandleOnKnifeRoundStarted implements got5.EventHandler

func (*Discord) HandleOnKnifeRoundWon

func (d *Discord) HandleOnKnifeRoundWon(ctx context.Context, p got5.OnKnifeRoundWonPayload) error

HandleOnKnifeRoundWon implements got5.EventHandler

func (*Discord) HandleOnLoadMatchConfigFailed

func (d *Discord) HandleOnLoadMatchConfigFailed(ctx context.Context, p got5.OnLoadMatchConfigFailedPayload) error

HandleOnLoadMatchConfigFailed implements got5.EventHandler

func (*Discord) HandleOnMapPicked

func (d *Discord) HandleOnMapPicked(ctx context.Context, p got5.OnMapPickedPayload) error

HandleOnMapPicked implements got5.EventHandler

func (*Discord) HandleOnMapResult

func (d *Discord) HandleOnMapResult(ctx context.Context, p got5.OnMapResultPayload) error

HandleOnMapResult implements got5.EventHandler どうせBO1だしマップ結果も出さなくていいんじゃないか...?

func (*Discord) HandleOnMapVetoed

func (d *Discord) HandleOnMapVetoed(ctx context.Context, p got5.OnMapVetoedPayload) error

HandleOnMapVetoed implements got5.EventHandler

func (*Discord) HandleOnMatchPaused

func (d *Discord) HandleOnMatchPaused(ctx context.Context, p got5.OnMatchPausedPayload) error

HandleOnMatchPaused implements got5.EventHandler

func (*Discord) HandleOnMatchUnpaused

func (d *Discord) HandleOnMatchUnpaused(ctx context.Context, p got5.OnMatchUnpausedPayload) error

HandleOnMatchUnpaused implements got5.EventHandler

func (*Discord) HandleOnMolotovDetonated

func (d *Discord) HandleOnMolotovDetonated(ctx context.Context, p got5.OnMolotovDetonatedPayload) error

HandleOnMolotovDetonated implements got5.EventHandler

func (*Discord) HandleOnPauseBegan

func (d *Discord) HandleOnPauseBegan(ctx context.Context, p got5.OnPauseBeganPayload) error

HandleOnPauseBegan implements got5.EventHandler.

func (*Discord) HandleOnPlayerBecameMVP

func (d *Discord) HandleOnPlayerBecameMVP(ctx context.Context, p got5.OnPlayerBecameMVPPayload) error

HandleOnPlayerBecameMVP implements got5.EventHandler

func (*Discord) HandleOnPlayerConnected

func (d *Discord) HandleOnPlayerConnected(ctx context.Context, p got5.OnPlayerConnectedPayload) error

HandleOnPlayerConnected implements got5.EventHandler

func (*Discord) HandleOnPlayerDeath

func (d *Discord) HandleOnPlayerDeath(ctx context.Context, p got5.OnPlayerDeathPayload) error

HandleOnPlayerDeath implements got5.EventHandler

func (*Discord) HandleOnPlayerDisconnected

func (d *Discord) HandleOnPlayerDisconnected(ctx context.Context, p got5.OnPlayerDisconnectedPayload) error

HandleOnPlayerDisconnected implements got5.EventHandler

func (*Discord) HandleOnPlayerSay

func (d *Discord) HandleOnPlayerSay(ctx context.Context, p got5.OnPlayerSayPayload) error

HandleOnPlayerSay implements got5.EventHandler

func (*Discord) HandleOnPreLoadMatchConfig

func (d *Discord) HandleOnPreLoadMatchConfig(ctx context.Context, p got5.OnPreLoadMatchConfigPayload) error

HandleOnPreLoadMatchConfig implements got5.EventHandler

func (*Discord) HandleOnRoundEnd

func (d *Discord) HandleOnRoundEnd(ctx context.Context, p got5.OnRoundEndPayload) error

HandleOnRoundEnd implements got5.EventHandler

func (*Discord) HandleOnRoundStart

func (d *Discord) HandleOnRoundStart(ctx context.Context, p got5.OnRoundStartPayload) error

HandleOnRoundStart implements got5.EventHandler

func (*Discord) HandleOnRoundStatsUpdated

func (d *Discord) HandleOnRoundStatsUpdated(ctx context.Context, p got5.OnRoundStatsUpdatedPayload) error

HandleOnRoundStatsUpdated implements got5.EventHandler

func (*Discord) HandleOnSeriesInit

func (d *Discord) HandleOnSeriesInit(ctx context.Context, p got5.OnSeriesInitPayload) error

HandleOnSeriesInit implements got5.EventHandler

func (*Discord) HandleOnSeriesResult

func (d *Discord) HandleOnSeriesResult(ctx context.Context, p got5.OnSeriesResultPayload) error

HandleOnSeriesResult implements got5.EventHandler

func (*Discord) HandleOnSidePicked

func (d *Discord) HandleOnSidePicked(ctx context.Context, p got5.OnSidePickedPayload) error

HandleOnSidePicked implements got5.EventHandler

func (*Discord) HandleOnSmokeGrenadeDetonated

func (d *Discord) HandleOnSmokeGrenadeDetonated(ctx context.Context, p got5.OnSmokeGrenadeDetonatedPayload) error

HandleOnSmokeGrenadeDetonated implements got5.EventHandler

func (*Discord) HandleOnTeamReadyStatusChanged

func (d *Discord) HandleOnTeamReadyStatusChanged(ctx context.Context, p got5.OnTeamReadyStatusChangedPayload) error

HandleOnTeamReadyStatusChanged implements got5.EventHandler

func (*Discord) Hostname

func (d *Discord) Hostname() string

Hostname implements got5.EventHandler

func (*Discord) Load

func (d *Discord) Load(ctx context.Context, mid string) (got5.G5Match, error)

Load implements got5.MatchLoader

func (*Discord) MatchAuth

func (d *Discord) MatchAuth(ctx context.Context, mid string, auth string) error

MatchAuth implements got5.JWTAuth

func (*Discord) RegisterMatch

func (d *Discord) RegisterMatch(ctx context.Context, m got5.Match) (got5.Match, error)

RegisterMatch implements got5.EventHandler

func (*Discord) UpdateMatch

func (*Discord) UpdateMatch(ctx context.Context, mid string, m got5.Match) error

UpdateMatch implements got5.EventHandler

func (*Discord) Upload

func (d *Discord) Upload(ctx context.Context, mid string, filename string, r io.Reader) error

Upload implements got5.DemoUploader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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