Make errorhandler and languagehandler async, await all database actions
This commit is contained in:
parent
926a632641
commit
95618b1f8b
46 changed files with 181 additions and 137 deletions
|
@ -24,14 +24,14 @@ namespace Geekbot.net.Commands.Utils
|
|||
{
|
||||
try
|
||||
{
|
||||
var transDict = _translation.GetDict(Context);
|
||||
var transDict = await _translation.GetDict(Context);
|
||||
var choicesArray = choices.Split(';');
|
||||
var choice = new Random().Next(choicesArray.Length);
|
||||
await ReplyAsync(string.Format(transDict["Choice"], choicesArray[choice]));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_errorHandler.HandleCommandException(e, Context);
|
||||
await _errorHandler.HandleCommandException(e, Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue