This commit is contained in:
2022-06-08 19:59:58 +03:00
parent 531edcd3cc
commit 51324f6dca
8 changed files with 47 additions and 21 deletions

View File

@@ -23,6 +23,12 @@ internal class Level : DBCommand
public async void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (!File.Exists(Config.GetValue<string>("LevelingSystemPath") + $"/{message.Author.Id}.dat"))
{
await context.Channel.SendMessageAsync("You are now unranked !");
return;
}
var user = await Functions.ConvertFromJson<User>(Config.GetValue<string>("LevelingSystemPath") + $"/{message.Author.Id}.dat");
if (user == null)
{