-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace FMBot.Bot.Builders; | ||
|
||
public class GameBuilders | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System.Threading.Tasks; | ||
using System; | ||
using Discord.Commands; | ||
using FMBot.Bot.Attributes; | ||
using FMBot.Bot.Builders; | ||
using FMBot.Bot.Extensions; | ||
using FMBot.Bot.Interfaces; | ||
using FMBot.Bot.Models; | ||
using FMBot.Bot.Services; | ||
using FMBot.Domain.Models; | ||
using Microsoft.Extensions.Options; | ||
using Fergun.Interactive; | ||
|
||
namespace FMBot.Bot.TextCommands; | ||
|
||
//[Name("Games")] | ||
public class GameCommands : BaseCommandModule | ||
{ | ||
private readonly UserService _userService; | ||
private readonly GameBuilders _gameBuilders; | ||
private readonly IPrefixService _prefixService; | ||
|
||
private InteractiveService Interactivity { get; } | ||
|
||
public GameCommands(IOptions<BotSettings> botSettings, UserService userService, GameBuilders gameBuilders, IPrefixService prefixService, InteractiveService interactivity) : base(botSettings) | ||
{ | ||
this._userService = userService; | ||
this._gameBuilders = gameBuilders; | ||
this._prefixService = prefixService; | ||
this.Interactivity = interactivity; | ||
} | ||
|
||
//[Command("jumble", RunMode = RunMode.Async)] | ||
//[Summary("Play the Jumble game.")] | ||
[UsernameSetRequired] | ||
//[CommandCategories(CommandCategory.Friends)] | ||
public async Task JumbleAsync() | ||
{ | ||
_ = this.Context.Channel.TriggerTypingAsync(); | ||
|
||
var contextUser = await this._userService.GetUserSettingsAsync(this.Context.User); | ||
var prfx = this._prefixService.GetPrefix(this.Context.Guild?.Id); | ||
|
||
try | ||
{ | ||
//var response = await this._gameBuilders.FriendsAsync(new ContextModel(this.Context, prfx, contextUser)); | ||
|
||
//await this.Context.SendResponse(this.Interactivity, response); | ||
//this.Context.LogCommandUsed(response.CommandResponse); | ||
} | ||
catch (Exception e) | ||
{ | ||
await this.Context.HandleCommandException(e); | ||
} | ||
} | ||
|
||
} |