mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Rename serverInfo() abstraction to getServerInfoEmbed()
Consistent with getUserInfoEmbed()
This commit is contained in:
parent
1df00d8548
commit
6f30356065
2 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { serverInfo } from "../functions/serverInfo";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
|
||||
export const ServerCmd = utilityCmd({
|
||||
trigger: ["server", "serverinfo"],
|
||||
|
@ -15,7 +15,7 @@ export const ServerCmd = utilityCmd({
|
|||
|
||||
async run({ message, pluginData, args }) {
|
||||
const serverId = args.serverId || pluginData.guild.id;
|
||||
const serverInfoEmbed = await serverInfo(pluginData, serverId);
|
||||
const serverInfoEmbed = await getServerInfoEmbed(pluginData, serverId);
|
||||
if (!serverInfoEmbed) {
|
||||
sendErrorMessage(pluginData, message.channel, "Could not find information for that server");
|
||||
return;
|
||||
|
|
|
@ -5,7 +5,10 @@ import { CategoryChannel, EmbedOptions, Guild, RESTChannelInvite, TextChannel, V
|
|||
import moment from "moment-timezone";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
|
||||
export async function serverInfo(pluginData: PluginData<UtilityPluginType>, serverId: string): Promise<EmbedOptions> {
|
||||
export async function getServerInfoEmbed(
|
||||
pluginData: PluginData<UtilityPluginType>,
|
||||
serverId: string,
|
||||
): Promise<EmbedOptions> {
|
||||
const thisServer = serverId === pluginData.guild.id ? pluginData.guild : null;
|
||||
const [restGuild, guildPreview] = await Promise.all([
|
||||
thisServer
|
Loading…
Add table
Reference in a new issue