mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
20 lines
662 B
TypeScript
20 lines
662 B
TypeScript
import { getGuildTz } from "../functions/getGuildTz";
|
|
import { timeAndDateCmd } from "../types";
|
|
|
|
export const ViewTimezoneCmd = timeAndDateCmd({
|
|
trigger: "timezone",
|
|
permission: "can_set_timezone",
|
|
|
|
signature: {},
|
|
|
|
async run({ pluginData, message, args }) {
|
|
const memberTimezone = await pluginData.state.memberTimezones.get(message.author.id);
|
|
if (memberTimezone) {
|
|
message.channel.send(`Your timezone is currently set to **${memberTimezone.timezone}**`);
|
|
return;
|
|
}
|
|
|
|
const serverTimezone = getGuildTz(pluginData);
|
|
message.channel.send(`Your timezone is currently set to **${serverTimezone}** (server default)`);
|
|
},
|
|
});
|