C# 클래스 SteamChatBot.Triggers.BaseTrigger

파일 보기 프로젝트 열기: Steam-Chat-Bot/SteamChatBot

공개 프로퍼티들

프로퍼티 타입 설명
ReplyEnabled bool

공개 메소드들

메소드 설명
BaseTrigger ( TriggerType type, string name, TriggerOptionsBase options ) : System
OnAnnouncement ( SteamID groupID, string headline, bool haveEatenEvent ) : bool

When a group makes an announcement

OnBannedChat ( SteamID roomID, SteamID bannedID, SteamID bannerID, bool haveSentMessage ) : bool

Returns true if a message was sent

OnChatInvite ( SteamID roomID, string roomName, SteamID inviterID ) : bool

Return true if the invite is accepted

OnChatMessage ( SteamID roomID, SteamID chatterID, string message, bool haveSentMessage ) : bool

Return true if a message was sent

OnDisconnected ( SteamID roomID, SteamID userID, bool haveSentMessage ) : bool

Returns true if a message was sent

OnEnteredChat ( SteamID roomID, SteamID userID, bool haveSentMessage ) : bool

Return true if a message was sent

OnFriendMessage ( SteamID userID, string message, bool haveSentMessage ) : bool

Return true if a message was sent

OnFriendRequest ( SteamID userID ) : bool

Return true if the request is accepted

OnKickedChat ( SteamID roomID, SteamID kickedID, SteamID kickerID, bool haveSentMessage ) : bool

Return true if a message was sent

OnLeftChat ( SteamID roomID, SteamID userID ) : bool

Return true if a message was sent

OnLoad ( ) : bool

Return true if trigger loads properly

OnLoggedOff ( ) : bool

Reacts to bot being logged off

OnLoggedOn ( ) : bool

Reacts to bot being logged on

OnSentMessage ( SteamID toID, string message, bool haveSentMessage ) : bool

Return true if message was seen but don't want other triggers to see

OnTradeOffer ( int number, bool haveEatenEvent ) : bool

When someone sends a trade offer

OnTradeProposed ( SteamID tradeID, SteamID userID, bool haveEatenEvent ) : bool

When someone sends a trade invite

OnTradeSession ( SteamID userID, bool haveEatenEvent ) : bool

When someone a trade is opened

ReadTriggers ( ) : List

Read triggers from username/triggers/

SaveTrigger ( ) : void

Save current trigger to file

onLoad ( ) : bool
onLoggedOff ( ) : bool
onLoggedOn ( ) : bool
respondToAnnouncement ( SteamID groupID, string headline ) : bool
respondToBan ( SteamID roomID, SteamID bannedId, SteamID bannerId ) : bool
respondToChatInvite ( SteamID roomID, string roomName, SteamID inviterId ) : bool
respondToChatMessage ( SteamID roomID, SteamID chatterId, string message ) : bool
respondToDisconnect ( SteamID roomID, SteamID userID ) : bool
respondToEnteredMessage ( SteamID roomID, SteamID userID ) : bool
respondToFriendMessage ( SteamID userID, string message ) : bool
respondToFriendRequest ( SteamID userID ) : bool
respondToKick ( SteamID roomID, SteamID kickedId, SteamID kickerId ) : bool
respondToLeftMessage ( SteamID roomID, SteamID userID ) : bool
respondToSentMessage ( SteamID toID, string message ) : bool
respondToTradeOffer ( int number ) : bool
respondToTradeProposal ( SteamID tradeId, SteamID steamId ) : bool
respondToTradeSession ( SteamID userID ) : bool

보호된 메소드들

메소드 설명
CheckIgnores ( SteamID toID, SteamID fromID ) : bool

Check to see if the user or room is on the ignore list

CheckRoom ( SteamID toID ) : bool

Check to see if the room is on the whitelist

CheckUser ( SteamID fromID ) : bool

Check to see if the user is on the whitelist

DisableForTimeout ( ) : void

Disables bot reply for the duration of the timeout

IfError ( string cbn, string name, string error ) : string

If there is an error, log it easily

RandomRoll ( ) : bool

Randomly decides if a message will be sent

SendMessageAfterDelay ( SteamID steamID, string message, bool room ) : void

Sends a message to the specified SteamID

StripCommand ( string message, string command ) : string[]

Splits the message and returns an array of words

비공개 메소드들

메소드 설명
AfterTimer_Timeout ( object sender, System.Timers.ElapsedEventArgs e ) : void
TimerElapsed_Message ( object sender, System.Timers.ElapsedEventArgs e, SteamID steamID, string message, bool room ) : void

메소드 상세

BaseTrigger() 공개 메소드

public BaseTrigger ( TriggerType type, string name, TriggerOptionsBase options ) : System
type TriggerType
name string
options SteamChatBot.Triggers.TriggerOptions.TriggerOptionsBase
리턴 System

CheckIgnores() 보호된 메소드

Check to see if the user or room is on the ignore list
protected CheckIgnores ( SteamID toID, SteamID fromID ) : bool
toID SteamKit2.SteamID
fromID SteamKit2.SteamID
리턴 bool

CheckRoom() 보호된 메소드

Check to see if the room is on the whitelist
protected CheckRoom ( SteamID toID ) : bool
toID SteamKit2.SteamID
리턴 bool

CheckUser() 보호된 메소드

Check to see if the user is on the whitelist
protected CheckUser ( SteamID fromID ) : bool
fromID SteamKit2.SteamID
리턴 bool

DisableForTimeout() 보호된 메소드

Disables bot reply for the duration of the timeout
protected DisableForTimeout ( ) : void
리턴 void

IfError() 보호된 메소드

If there is an error, log it easily
protected IfError ( string cbn, string name, string error ) : string
cbn string
name string
error string
리턴 string

OnAnnouncement() 공개 메소드

When a group makes an announcement
public OnAnnouncement ( SteamID groupID, string headline, bool haveEatenEvent ) : bool
groupID SteamKit2.SteamID
headline string
haveEatenEvent bool
리턴 bool

OnBannedChat() 공개 메소드

Returns true if a message was sent
public OnBannedChat ( SteamID roomID, SteamID bannedID, SteamID bannerID, bool haveSentMessage ) : bool
roomID SteamKit2.SteamID
bannedID SteamKit2.SteamID
bannerID SteamKit2.SteamID
haveSentMessage bool
리턴 bool

OnChatInvite() 공개 메소드

Return true if the invite is accepted
public OnChatInvite ( SteamID roomID, string roomName, SteamID inviterID ) : bool
roomID SteamKit2.SteamID
roomName string
inviterID SteamKit2.SteamID
리턴 bool

OnChatMessage() 공개 메소드

Return true if a message was sent
public OnChatMessage ( SteamID roomID, SteamID chatterID, string message, bool haveSentMessage ) : bool
roomID SteamKit2.SteamID
chatterID SteamKit2.SteamID
message string
haveSentMessage bool
리턴 bool

OnDisconnected() 공개 메소드

Returns true if a message was sent
public OnDisconnected ( SteamID roomID, SteamID userID, bool haveSentMessage ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
haveSentMessage bool
리턴 bool

OnEnteredChat() 공개 메소드

Return true if a message was sent
public OnEnteredChat ( SteamID roomID, SteamID userID, bool haveSentMessage ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
haveSentMessage bool
리턴 bool

OnFriendMessage() 공개 메소드

Return true if a message was sent
public OnFriendMessage ( SteamID userID, string message, bool haveSentMessage ) : bool
userID SteamKit2.SteamID
message string
haveSentMessage bool
리턴 bool

OnFriendRequest() 공개 메소드

Return true if the request is accepted
public OnFriendRequest ( SteamID userID ) : bool
userID SteamKit2.SteamID
리턴 bool

OnKickedChat() 공개 메소드

Return true if a message was sent
public OnKickedChat ( SteamID roomID, SteamID kickedID, SteamID kickerID, bool haveSentMessage ) : bool
roomID SteamKit2.SteamID
kickedID SteamKit2.SteamID
kickerID SteamKit2.SteamID
haveSentMessage bool
리턴 bool

OnLeftChat() 공개 메소드

Return true if a message was sent
public OnLeftChat ( SteamID roomID, SteamID userID ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
리턴 bool

OnLoad() 공개 메소드

Return true if trigger loads properly
public OnLoad ( ) : bool
리턴 bool

OnLoggedOff() 공개 메소드

Reacts to bot being logged off
public OnLoggedOff ( ) : bool
리턴 bool

OnLoggedOn() 공개 메소드

Reacts to bot being logged on
public OnLoggedOn ( ) : bool
리턴 bool

OnSentMessage() 공개 메소드

Return true if message was seen but don't want other triggers to see
public OnSentMessage ( SteamID toID, string message, bool haveSentMessage ) : bool
toID SteamKit2.SteamID
message string
haveSentMessage bool
리턴 bool

OnTradeOffer() 공개 메소드

When someone sends a trade offer
public OnTradeOffer ( int number, bool haveEatenEvent ) : bool
number int
haveEatenEvent bool
리턴 bool

OnTradeProposed() 공개 메소드

When someone sends a trade invite
public OnTradeProposed ( SteamID tradeID, SteamID userID, bool haveEatenEvent ) : bool
tradeID SteamKit2.SteamID
userID SteamKit2.SteamID
haveEatenEvent bool
리턴 bool

OnTradeSession() 공개 메소드

When someone a trade is opened
public OnTradeSession ( SteamID userID, bool haveEatenEvent ) : bool
userID SteamKit2.SteamID
haveEatenEvent bool
리턴 bool

RandomRoll() 보호된 메소드

Randomly decides if a message will be sent
protected RandomRoll ( ) : bool
리턴 bool

ReadTriggers() 공개 정적인 메소드

Read triggers from username/triggers/
public static ReadTriggers ( ) : List
리턴 List

SaveTrigger() 공개 메소드

Save current trigger to file
public SaveTrigger ( ) : void
리턴 void

SendMessageAfterDelay() 보호된 메소드

Sends a message to the specified SteamID
protected SendMessageAfterDelay ( SteamID steamID, string message, bool room ) : void
steamID SteamKit2.SteamID
message string
room bool
리턴 void

StripCommand() 보호된 메소드

Splits the message and returns an array of words
protected StripCommand ( string message, string command ) : string[]
message string
command string
리턴 string[]

onLoad() 공개 메소드

public onLoad ( ) : bool
리턴 bool

onLoggedOff() 공개 메소드

public onLoggedOff ( ) : bool
리턴 bool

onLoggedOn() 공개 메소드

public onLoggedOn ( ) : bool
리턴 bool

respondToAnnouncement() 공개 메소드

public respondToAnnouncement ( SteamID groupID, string headline ) : bool
groupID SteamKit2.SteamID
headline string
리턴 bool

respondToBan() 공개 메소드

public respondToBan ( SteamID roomID, SteamID bannedId, SteamID bannerId ) : bool
roomID SteamKit2.SteamID
bannedId SteamKit2.SteamID
bannerId SteamKit2.SteamID
리턴 bool

respondToChatInvite() 공개 메소드

public respondToChatInvite ( SteamID roomID, string roomName, SteamID inviterId ) : bool
roomID SteamKit2.SteamID
roomName string
inviterId SteamKit2.SteamID
리턴 bool

respondToChatMessage() 공개 메소드

public respondToChatMessage ( SteamID roomID, SteamID chatterId, string message ) : bool
roomID SteamKit2.SteamID
chatterId SteamKit2.SteamID
message string
리턴 bool

respondToDisconnect() 공개 메소드

public respondToDisconnect ( SteamID roomID, SteamID userID ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
리턴 bool

respondToEnteredMessage() 공개 메소드

public respondToEnteredMessage ( SteamID roomID, SteamID userID ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
리턴 bool

respondToFriendMessage() 공개 메소드

public respondToFriendMessage ( SteamID userID, string message ) : bool
userID SteamKit2.SteamID
message string
리턴 bool

respondToFriendRequest() 공개 메소드

public respondToFriendRequest ( SteamID userID ) : bool
userID SteamKit2.SteamID
리턴 bool

respondToKick() 공개 메소드

public respondToKick ( SteamID roomID, SteamID kickedId, SteamID kickerId ) : bool
roomID SteamKit2.SteamID
kickedId SteamKit2.SteamID
kickerId SteamKit2.SteamID
리턴 bool

respondToLeftMessage() 공개 메소드

public respondToLeftMessage ( SteamID roomID, SteamID userID ) : bool
roomID SteamKit2.SteamID
userID SteamKit2.SteamID
리턴 bool

respondToSentMessage() 공개 메소드

public respondToSentMessage ( SteamID toID, string message ) : bool
toID SteamKit2.SteamID
message string
리턴 bool

respondToTradeOffer() 공개 메소드

public respondToTradeOffer ( int number ) : bool
number int
리턴 bool

respondToTradeProposal() 공개 메소드

public respondToTradeProposal ( SteamID tradeId, SteamID steamId ) : bool
tradeId SteamKit2.SteamID
steamId SteamKit2.SteamID
리턴 bool

respondToTradeSession() 공개 메소드

public respondToTradeSession ( SteamID userID ) : bool
userID SteamKit2.SteamID
리턴 bool

프로퍼티 상세

ReplyEnabled 공개적으로 프로퍼티

public bool ReplyEnabled
리턴 bool