Type fixes for djs
This commit is contained in:
parent
653d6c1dc2
commit
0822fc15e5
130 changed files with 8877 additions and 411 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Permissions } from "discord.js";
|
||||
import { Permissions, Snowflake } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { nonNullish, unique } from "../../../utils";
|
||||
|
@ -41,7 +41,7 @@ export const AddRolesAction = automodAction({
|
|||
|
||||
if (rolesWeCannotAssign.length) {
|
||||
const roleNamesWeCannotAssign = rolesWeCannotAssign.map(
|
||||
roleId => pluginData.guild.roles.cache.get(roleId)?.name || roleId,
|
||||
roleId => pluginData.guild.roles.cache.get(roleId as Snowflake)?.name || roleId,
|
||||
);
|
||||
const logs = pluginData.getPlugin(LogsPlugin);
|
||||
logs.log(LogType.BOT_ALERT, {
|
||||
|
@ -55,7 +55,7 @@ export const AddRolesAction = automodAction({
|
|||
members.map(async member => {
|
||||
const memberRoles = new Set(member.roles.cache.keyArray());
|
||||
for (const roleId of rolesToAssign) {
|
||||
memberRoles.add(roleId);
|
||||
memberRoles.add(roleId as Snowflake);
|
||||
ignoreRoleChange(pluginData, member.id, roleId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue