Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdShullah committed Aug 13, 2020
1 parent 648f93c commit 95d5734
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion OsuFriendsBot/Embeds/GrantedRolesEmbed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using OsuFriendsApi.Entities;
using OsuFriendsBot.Osu;
using OsuFriendsDb.Models;
using System;
using System.Collections.Generic;
using System.Linq;

Expand Down
5 changes: 2 additions & 3 deletions OsuFriendsBot/Modules/FunModule.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Microsoft.Extensions.Logging;
using OsuFriendsBot.Services;
using OsuFriendsDb.Services;
using System.Threading.Tasks;

Expand All @@ -21,11 +19,12 @@ public FunModule(DbUserDataService dbUserData, ILogger<FunModule> logger)
_dbUserData = dbUserData;
_logger = logger;
}

[Command("uwu")]
[Summary("UwU")]
public async Task UwuCmd()
{
var count = _dbUserData.FindById(Context.User.Id).Uwu;
int count = _dbUserData.FindById(Context.User.Id).Uwu;
await ReplyAsync($"{Format.Bold("What's this?")} | {Context.User.Username}, you've {Format.Bold("uwu")}'d {Format.Code(count.ToString())} times");
}
}
Expand Down
3 changes: 1 addition & 2 deletions OsuFriendsBot/Services/CommandHandlingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public async Task MessageReceivedAsync(SocketMessage rawMessage)
return;
}


await UwuAsync(message);
await ProcessCommandAsync(message);
}
Expand All @@ -65,7 +64,7 @@ private async Task UwuAsync(SocketUserMessage message)
{
if (message.Content == "uwu") // ;)
{
var user = _dbUserData.FindById(message.Author.Id);
OsuFriendsDb.Models.UserData user = _dbUserData.FindById(message.Author.Id);
user.Uwu++;
_dbUserData.Upsert(user);
await message.Channel.SendMessageAsync("What's This?");
Expand Down

0 comments on commit 95d5734

Please sign in to comment.