3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-08 11:37:20 +00:00

chore: resolve lint errors

This commit is contained in:
Dragory 2024-01-27 14:21:32 +02:00
parent 59c5176cbd
commit 77ab2718e7
No known key found for this signature in database
17 changed files with 16 additions and 40 deletions

View file

@ -42,7 +42,7 @@ export const InfoCmd = utilityCmd({
const channelId = getChannelId(value);
const channel = channelId && pluginData.guild.channels.cache.get(channelId as Snowflake);
if (channel) {
const embed = await getChannelInfoEmbed(pluginData, channelId!, message.author.id);
const embed = await getChannelInfoEmbed(pluginData, channelId!);
if (embed) {
message.channel.send({ embeds: [embed] });
return;
@ -54,7 +54,7 @@ export const InfoCmd = utilityCmd({
if (userCfg.can_server) {
const guild = await pluginData.client.guilds.fetch(value as Snowflake).catch(noop);
if (guild) {
const embed = await getServerInfoEmbed(pluginData, value, message.author.id);
const embed = await getServerInfoEmbed(pluginData, value);
if (embed) {
message.channel.send({ embeds: [embed] });
return;
@ -66,7 +66,7 @@ export const InfoCmd = utilityCmd({
if (userCfg.can_userinfo) {
const user = await resolveUser(pluginData.client, value);
if (user && userCfg.can_userinfo) {
const embed = await getUserInfoEmbed(pluginData, user.id, Boolean(args.compact), message.author.id);
const embed = await getUserInfoEmbed(pluginData, user.id, Boolean(args.compact));
if (embed) {
message.channel.send({ embeds: [embed] });
return;
@ -83,7 +83,6 @@ export const InfoCmd = utilityCmd({
pluginData,
messageTarget.channel.id,
messageTarget.messageId,
message.author.id,
);
if (embed) {
message.channel.send({ embeds: [embed] });
@ -112,7 +111,7 @@ export const InfoCmd = utilityCmd({
if (userCfg.can_server) {
const serverPreview = await getGuildPreview(pluginData.client, value).catch(() => null);
if (serverPreview) {
const embed = await getServerInfoEmbed(pluginData, value, message.author.id);
const embed = await getServerInfoEmbed(pluginData, value);
if (embed) {
message.channel.send({ embeds: [embed] });
return;
@ -125,7 +124,7 @@ export const InfoCmd = utilityCmd({
const roleId = getRoleId(value);
const role = roleId && pluginData.guild.roles.cache.get(roleId as Snowflake);
if (role) {
const embed = await getRoleInfoEmbed(pluginData, role, message.author.id);
const embed = await getRoleInfoEmbed(pluginData, role);
message.channel.send({ embeds: [embed] });
return;
}
@ -145,7 +144,7 @@ export const InfoCmd = utilityCmd({
// 9. Arbitrary ID
if (isValidSnowflake(value) && userCfg.can_snowflake) {
const embed = await getSnowflakeInfoEmbed(pluginData, value, true, message.author.id);
const embed = await getSnowflakeInfoEmbed(value, true);
message.channel.send({ embeds: [embed] });
return;
}

View file

@ -24,7 +24,6 @@ export const MessageInfoCmd = utilityCmd({
pluginData,
args.message.channel.id,
args.message.messageId,
message.author.id,
);
if (!embed) {
sendErrorMessage(pluginData, message.channel, "Unknown message");

View file

@ -13,7 +13,7 @@ export const RoleInfoCmd = utilityCmd({
},
async run({ message, args, pluginData }) {
const embed = await getRoleInfoEmbed(pluginData, args.role, message.author.id);
const embed = await getRoleInfoEmbed(pluginData, args.role);
message.channel.send({ embeds: [embed] });
},
});

View file

@ -15,7 +15,7 @@ export const ServerInfoCmd = utilityCmd({
async run({ message, pluginData, args }) {
const serverId = args.serverId || pluginData.guild.id;
const serverInfoEmbed = await getServerInfoEmbed(pluginData, serverId, message.author.id);
const serverInfoEmbed = await getServerInfoEmbed(pluginData, serverId);
if (!serverInfoEmbed) {
sendErrorMessage(pluginData, message.channel, "Could not find information for that server");
return;

View file

@ -12,8 +12,8 @@ export const SnowflakeInfoCmd = utilityCmd({
id: ct.anyId(),
},
async run({ message, args, pluginData }) {
const embed = await getSnowflakeInfoEmbed(pluginData, args.id, false, message.author.id);
async run({ message, args }) {
const embed = await getSnowflakeInfoEmbed(args.id, false);
message.channel.send({ embeds: [embed] });
},
});

View file

@ -17,7 +17,7 @@ export const UserInfoCmd = utilityCmd({
async run({ message, args, pluginData }) {
const userId = args.user?.id || message.author.id;
const embed = await getUserInfoEmbed(pluginData, userId, args.compact, message.author.id);
const embed = await getUserInfoEmbed(pluginData, userId, args.compact);
if (!embed) {
sendErrorMessage(pluginData, message.channel, "User not found");
return;