mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43:36 +03:00
github editing moment x6
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
This commit is contained in:
parent
6adb25ad6f
commit
0ed4e165bc
1 changed files with 6 additions and 6 deletions
|
@ -82,6 +82,12 @@ public class ToolsCommandGroup : CommandGroup
|
||||||
return Result.FromError(userResult);
|
return Result.FromError(userResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentUserResult = await _userApi.GetCurrentUserAsync(CancellationToken);
|
||||||
|
if (!currentUserResult.IsDefined(out var currentUser))
|
||||||
|
{
|
||||||
|
return Result.FromError(currentUserResult);
|
||||||
|
}
|
||||||
|
|
||||||
var data = await _guildData.GetData(guildId, CancellationToken);
|
var data = await _guildData.GetData(guildId, CancellationToken);
|
||||||
Messages.Culture = GuildSettings.Language.Get(data.Settings);
|
Messages.Culture = GuildSettings.Language.Get(data.Settings);
|
||||||
|
|
||||||
|
@ -245,12 +251,6 @@ public class ToolsCommandGroup : CommandGroup
|
||||||
return new ArgumentInvalidError(nameof(_context), "Unable to retrieve necessary IDs from command context");
|
return new ArgumentInvalidError(nameof(_context), "Unable to retrieve necessary IDs from command context");
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentUserResult = await _userApi.GetCurrentUserAsync(CancellationToken);
|
|
||||||
if (!currentUserResult.IsDefined(out var currentUser))
|
|
||||||
{
|
|
||||||
return Result.FromError(currentUserResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
var userResult = await _userApi.GetUserAsync(userId, CancellationToken);
|
var userResult = await _userApi.GetUserAsync(userId, CancellationToken);
|
||||||
if (!userResult.IsDefined(out var user))
|
if (!userResult.IsDefined(out var user))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue