Implement disabling the exp module
This commit is contained in:
parent
ff854df99d
commit
d71f4ac3c6
@ -20,6 +20,7 @@ namespace ChaosBot.Discord.Modules.User
|
||||
[Command("level")]
|
||||
[Alias("xp", "exp", "experience", "lvl")]
|
||||
[CheckCommandPerm("User")]
|
||||
[CheckModuleEnabled("Experience")]
|
||||
public async Task XpShowInfo()
|
||||
{
|
||||
try
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using ChaosBot.Discord.PreConditions;
|
||||
using ChaosBot.Models;
|
||||
using ChaosBot.Repositories;
|
||||
using Discord;
|
||||
@ -19,6 +20,8 @@ namespace ChaosBot.Discord.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!CheckModuleEnabled.GetResult(context, "Experience")) return;
|
||||
|
||||
using (ChaosbotContext dbContext = new ChaosbotContext())
|
||||
{
|
||||
IQueryable<Experience> ctxUser = dbContext.ExperiencePoints;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user