C# Class qtbot.BotTools.Tools

显示文件 Open project: stepperman/HB-Discord-Bot

Public Properties

Property Type Description
random System.Random

Public Methods

Method Description
CalculateTime ( int minutes ) : string
CalculateTimeWithSeconds ( int seconds ) : string
CreateFile ( string Path ) : void
GetPerms ( CommandArgs e, IGuildUser u ) : int
GetPerms ( ulong serverId, IGuildUser u ) : int
GetServerInfo ( ulong serverId ) : ServerInfo
GetUser ( CommandArgs eventArgs ) : SocketUser
InRange ( double val, double min, double max ) : bool
LogError ( string ErrorMessage, string exMessage ) : void
ReadFile ( string Path ) : string
ReplyAsync ( CommandArgs e, string text ) : Task
ReplyAsync ( CommandArgs e, string text, bool mentionUser ) : Task
ReplyAsync ( SocketUser user, IMessageChannel channel, string text, bool mentionUser ) : Task
SaveFile ( string content, string Path, FileMode append ) : void
SaveServerInfo ( ) : void

Private Methods

Method Description
Tools ( ) : System

Method Details

CalculateTime() public static method

public static CalculateTime ( int minutes ) : string
minutes int
return string

CalculateTimeWithSeconds() public static method

public static CalculateTimeWithSeconds ( int seconds ) : string
seconds int
return string

CreateFile() public static method

public static CreateFile ( string Path ) : void
Path string
return void

GetPerms() public static method

public static GetPerms ( CommandArgs e, IGuildUser u ) : int
e qtbot.CommandPlugin.CommandArgs
u IGuildUser
return int

GetPerms() public static method

public static GetPerms ( ulong serverId, IGuildUser u ) : int
serverId ulong
u IGuildUser
return int

GetServerInfo() public static method

public static GetServerInfo ( ulong serverId ) : ServerInfo
serverId ulong
return ServerInfo

GetUser() public static method

public static GetUser ( CommandArgs eventArgs ) : SocketUser
eventArgs qtbot.CommandPlugin.CommandArgs
return SocketUser

InRange() public static method

public static InRange ( double val, double min, double max ) : bool
val double
min double
max double
return bool

LogError() public static method

public static LogError ( string ErrorMessage, string exMessage ) : void
ErrorMessage string
exMessage string
return void

ReadFile() public static method

public static ReadFile ( string Path ) : string
Path string
return string

ReplyAsync() public static method

public static ReplyAsync ( CommandArgs e, string text ) : Task
e qtbot.CommandPlugin.CommandArgs
text string
return Task

ReplyAsync() public static method

public static ReplyAsync ( CommandArgs e, string text, bool mentionUser ) : Task
e qtbot.CommandPlugin.CommandArgs
text string
mentionUser bool
return Task

ReplyAsync() public static method

public static ReplyAsync ( SocketUser user, IMessageChannel channel, string text, bool mentionUser ) : Task
user SocketUser
channel IMessageChannel
text string
mentionUser bool
return Task

SaveFile() public static method

public static SaveFile ( string content, string Path, FileMode append ) : void
content string
Path string
append FileMode
return void

SaveServerInfo() public static method

public static SaveServerInfo ( ) : void
return void

Property Details

random public_oe static_oe property

public static Random,System random
return System.Random