mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-07-16 17:01:00 +02:00
feat(arabot): add scheduled standup reminder
This commit is contained in:
parent
1b71e46f40
commit
8ab25c6a48
@ -17,23 +17,15 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Command } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { Message } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
|
import { IDs } from '../utils/ids';
|
||||||
|
|
||||||
export class PingCommand extends Command {
|
export async function standupRun() {
|
||||||
public constructor(context: Command.Context) {
|
const { client } = container;
|
||||||
super(context, {
|
|
||||||
name: 'ping',
|
|
||||||
aliases: ['pong'],
|
|
||||||
description: 'ping pong',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public async messageRun(message: Message) {
|
const channel = client.channels.cache.get(IDs.channels.staff.coordinators) as TextChannel;
|
||||||
const msg = await message.channel.send('Ping?');
|
|
||||||
|
|
||||||
const content = `Pong from JavaScript! Bot Latency ${Math.round(this.container.client.ws.ping)}ms. API Latency ${msg.createdTimestamp - message.createdTimestamp}ms.`;
|
await channel.send(`Hiya <@&${IDs.roles.staff.coordinator}> it's time for your weekly standup!
|
||||||
|
\nPlease submit it in <#${IDs.channels.staff.standup}> :)`);
|
||||||
return msg.edit(content);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -37,6 +37,16 @@ const IDs = {
|
|||||||
restricted3: '856582673258774538',
|
restricted3: '856582673258774538',
|
||||||
restricted4: '872472182888992858',
|
restricted4: '872472182888992858',
|
||||||
},
|
},
|
||||||
|
staff: {
|
||||||
|
coordinator: '993636242019323904',
|
||||||
|
devCoordinator: '966031741099855973',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
channels: {
|
||||||
|
staff: {
|
||||||
|
coordinators: '989249700353953843',
|
||||||
|
standup: '996009201237233684',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user