mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 11:37:20 +00:00
Fixes, refactoring and PR feedback
This commit is contained in:
parent
0be54912c4
commit
893a77d562
202 changed files with 1037 additions and 1069 deletions
|
@ -11,8 +11,6 @@ export const ResetTimezoneCmd = timeAndDateCmd({
|
|||
async run({ pluginData, message }) {
|
||||
await pluginData.state.memberTimezones.reset(message.author.id);
|
||||
const serverTimezone = getGuildTz(pluginData);
|
||||
pluginData
|
||||
.getPlugin(CommonPlugin)
|
||||
.sendSuccessMessage(message, `Your timezone has been reset to server default, **${serverTimezone}**`);
|
||||
void pluginData.state.common.sendSuccessMessage(message, `Your timezone has been reset to server default, **${serverTimezone}**`);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ export const SetTimezoneCmd = timeAndDateCmd({
|
|||
async run({ pluginData, message, args }) {
|
||||
const parsedTz = parseFuzzyTimezone(args.timezone);
|
||||
if (!parsedTz) {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
message,
|
||||
trimLines(`
|
||||
Invalid timezone: \`${escapeInlineCode(args.timezone)}\`
|
||||
|
@ -28,6 +28,6 @@ export const SetTimezoneCmd = timeAndDateCmd({
|
|||
}
|
||||
|
||||
await pluginData.state.memberTimezones.set(message.author.id, parsedTz);
|
||||
pluginData.getPlugin(CommonPlugin).sendSuccessMessage(message, `Your timezone is now set to **${parsedTz}**`);
|
||||
void pluginData.state.common.sendSuccessMessage(message, `Your timezone is now set to **${parsedTz}**`);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue