3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Type fixes for djs

This commit is contained in:
Dark 2021-06-30 04:56:56 +02:00
parent 653d6c1dc2
commit 0822fc15e5
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
130 changed files with 8877 additions and 411 deletions

View file

@ -1,4 +1,4 @@
import { TextChannel } from "discord.js";
import { Snowflake, TextChannel } from "discord.js";
import { AllowedGuilds } from "../../data/AllowedGuilds";
import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments";
import { Configs } from "../../data/Configs";
@ -58,9 +58,9 @@ export const BotControlPlugin = zeppelinGlobalPlugin<BotControlPluginType>()({
const [guildId, channelId] = activeReload;
resetActiveReload();
const guild = await pluginData.client.guilds.fetch(guildId);
const guild = await pluginData.client.guilds.fetch(guildId as Snowflake);
if (guild) {
const channel = guild.channels.cache.get(channelId);
const channel = guild.channels.cache.get(channelId as Snowflake);
if (channel instanceof TextChannel) {
sendSuccessMessage(pluginData, channel, "Global plugins reloaded!");
}

View file

@ -15,9 +15,9 @@ export const ServersCmd = botControlCmd({
signature: {
search: ct.string({ catchAll: true, required: false }),
all: ct.switchOption({ shortcut: "a" }),
initialized: ct.switchOption({ shortcut: "i" }),
uninitialized: ct.switchOption({ shortcut: "u" }),
all: ct.switchOption({ def: false, shortcut: "a" }),
initialized: ct.switchOption({ def: false, shortcut: "i" }),
uninitialized: ct.switchOption({ def: false, shortcut: "u" }),
},
async run({ pluginData, message: msg, args }) {