Skip to content

Commit

Permalink
temp disable jumble
Browse files Browse the repository at this point in the history
  • Loading branch information
th0mk committed Jun 5, 2024
1 parent 88f79c5 commit 48a23e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/FMBot.Bot/TextCommands/GameCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ public class GameCommands : BaseCommandModule
private readonly GameBuilders _gameBuilders;
private readonly IPrefixService _prefixService;
private readonly GameService _gameService;
private readonly AdminService _adminService;

private InteractiveService Interactivity { get; }

public GameCommands(IOptions<BotSettings> botSettings, UserService userService, GameBuilders gameBuilders, IPrefixService prefixService, InteractiveService interactivity, GameService gameService) : base(botSettings)
public GameCommands(IOptions<BotSettings> botSettings, UserService userService, GameBuilders gameBuilders, IPrefixService prefixService, InteractiveService interactivity, GameService gameService, AdminService adminService) : base(botSettings)
{
this._userService = userService;
this._gameBuilders = gameBuilders;
this._prefixService = prefixService;
this.Interactivity = interactivity;
this._gameService = gameService;
this._adminService = adminService;
}

[Command("jumble", RunMode = RunMode.Async)]
Expand All @@ -44,6 +46,13 @@ public async Task JumbleAsync()
var contextUser = await this._userService.GetUserSettingsAsync(this.Context.User);
var prfx = this._prefixService.GetPrefix(this.Context.Guild?.Id);

if (!await this._adminService.HasCommandAccessAsync(this.Context.User, UserType.Admin))
{
await ReplyAsync("Sorry, still fixing some bugs, this isn't quite ready yet. Try again later..");
this.Context.LogCommandUsed(CommandResponse.NoPermission);
return;
}

try
{
var context = new ContextModel(this.Context, prfx, contextUser);
Expand Down
2 changes: 1 addition & 1 deletion src/FMBot.Bot/TextCommands/UserCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public async Task FeaturedAsync([Remainder] string options = null)

[Command("featuredlog", RunMode = RunMode.Async)]
[Summary("Shows featured history")]
[Alias("featuredhistory", "recentfeatured", "rf", "recentlyfeatured", "fl")]
[Alias("featuredhistory", "recentfeatured", "rf", "recentlyfeatured", "fl", "flog")]
[Options("global/server/friends/self")]
[CommandCategories(CommandCategory.Other)]
[UsernameSetRequired]
Expand Down

0 comments on commit 48a23e4

Please sign in to comment.