PrivateMessageEventArgs.WaitForNextMessageAsync method (1 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回null
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(
Func<BaseMessageEventArgs, bool> matchFunc)
parameter | description |
---|---|
matchFunc | 指令表达式 |
Return Value
触发后的事件参数
See Also
- class BaseMessageEventArgs
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent
PrivateMessageEventArgs.WaitForNextMessageAsync method (2 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回null
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(
Func<BaseMessageEventArgs, bool> matchFunc, TimeSpan timeout,
Func<ValueTask> timeoutTask = null)
parameter | description |
---|---|
matchFunc | 指令表达式 |
timeout | 超时 |
timeoutTask | 超时后执行的动作 |
Return Value
触发后的事件参数
See Also
- class BaseMessageEventArgs
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent
PrivateMessageEventArgs.WaitForNextMessageAsync method (3 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回false
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(string commandExp,
MatchType matchType, RegexOptions regexOptions = RegexOptions.None)
parameter | description |
---|---|
commandExp | 指令表达式 |
matchType | 匹配类型 |
regexOptions | 正则匹配选项 |
Return Value
触发后的事件参数
See Also
- enum MatchType
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent
PrivateMessageEventArgs.WaitForNextMessageAsync method (4 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回false
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(string[] commandExps,
MatchType matchType, RegexOptions regexOptions = RegexOptions.None)
parameter | description |
---|---|
commandExps | 指令表达式 |
matchType | 匹配类型 |
regexOptions | 正则匹配选项 |
Return Value
触发后的事件参数
See Also
- enum MatchType
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent
PrivateMessageEventArgs.WaitForNextMessageAsync method (5 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回false
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(string commandExp,
MatchType matchType, TimeSpan timeout, Func<ValueTask> timeoutTask = null,
RegexOptions regexOptions = RegexOptions.None)
parameter | description |
---|---|
commandExp | 指令表达式 |
matchType | 匹配类型 |
regexOptions | 正则匹配选项 |
timeout | 超时 |
timeoutTask | 超时后执行的动作 |
Return Value
触发后的事件参数,超时后为null
See Also
- enum MatchType
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent
PrivateMessageEventArgs.WaitForNextMessageAsync method (6 of 6)
等待下一条消息触发
当所在的上下文被重复触发时则会直接返回false
public ValueTask<PrivateMessageEventArgs> WaitForNextMessageAsync(string[] commandExps,
MatchType matchType, TimeSpan timeout, Func<ValueTask> timeoutTask = null,
RegexOptions regexOptions = RegexOptions.None)
parameter | description |
---|---|
commandExps | 指令表达式 |
matchType | 匹配类型 |
regexOptions | 正则匹配选项 |
timeout | 超时 |
timeoutTask | 超时后执行的动作 |
Return Value
触发后的事件参数,超时后为null
See Also
- enum MatchType
- class PrivateMessageEventArgs
- namespace Sora.EventArgs.SoraEvent