forgot awaits

This commit is contained in:
Cynthia Foxwell 2022-05-07 17:59:02 -06:00
parent b3211886e2
commit 7c29a4e983
2 changed files with 3 additions and 3 deletions

View file

@ -184,7 +184,7 @@ settings.callback = async function (msg, line, cmd, key, value) {
if (!guildSettings.flags[key]) return "Unknown key."; if (!guildSettings.flags[key]) return "Unknown key.";
const enabled = guildSettings.hasFlag(msg.guildID, key); const enabled = await guildSettings.hasFlag(msg.guildID, key);
if (enabled === true) return "Already enabled."; if (enabled === true) return "Already enabled.";
await guildSettings.enableFlag(msg.guildID, key); await guildSettings.enableFlag(msg.guildID, key);
@ -199,7 +199,7 @@ settings.callback = async function (msg, line, cmd, key, value) {
if (!guildSettings.flags[key]) return "Unknown key."; if (!guildSettings.flags[key]) return "Unknown key.";
const enabled = guildSettings.hasFlag(msg.guildID, key); const enabled = await guildSettings.hasFlag(msg.guildID, key);
if (enabled === false) return "Already disabled."; if (enabled === false) return "Already disabled.";
await guildSettings.disableFlag(msg.guildID, key); await guildSettings.disableFlag(msg.guildID, key);

View file

@ -78,7 +78,7 @@ async function processFile(link) {
events.add("messageCreate", "codePreviews", async function (msg) { events.add("messageCreate", "codePreviews", async function (msg) {
if (!msg.guildID) return; if (!msg.guildID) return;
if (!hasFlag(msg.guildID, "codePreviews")) return; if (!(await hasFlag(msg.guildID, "codePreviews"))) return;
let out = ""; let out = "";