Add GeekbotBase as an extension of ModuleBase
This commit is contained in:
parent
ced287e492
commit
8d9c436cfc
8 changed files with 113 additions and 11 deletions
|
@ -6,12 +6,13 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Database;
|
||||
using Geekbot.net.Database.Models;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
|
||||
namespace Geekbot.net.Commands.Randomness
|
||||
{
|
||||
public class Slap : ModuleBase
|
||||
public class Slap : GeekbotBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
private readonly DatabaseContext _database;
|
||||
|
@ -24,7 +25,7 @@ namespace Geekbot.net.Commands.Randomness
|
|||
|
||||
[Command("slap", RunMode = RunMode.Async)]
|
||||
[Summary("slap someone")]
|
||||
public async Task Slapper([Summary("@someone")] IUser user)
|
||||
public async Task Slapper([Summary("@someone")] IGuildUser user)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -79,7 +80,7 @@ namespace Geekbot.net.Commands.Randomness
|
|||
"powerless banhammer"
|
||||
};
|
||||
|
||||
await ReplyAsync($"{Context.User.Username} slapped {user.Username} with a {things[new Random().Next(things.Count - 1)]}");
|
||||
await ReplyAsync($"{Context.GuildUser.Nickname} slapped {user.Nickname} with a {things[new Random().Next(things.Count - 1)]}");
|
||||
|
||||
await UpdateRecieved(user.Id);
|
||||
await UpdateGiven(Context.User.Id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue