Merge pull request #3 from ryanccn/e

This commit is contained in:
Ryan Cao 2022-10-18 23:18:00 +08:00 committed by GitHub
commit ceb1fdfbdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 13 deletions

View file

@ -15,12 +15,7 @@ export const membersCommand = async (
{
title: `${memes.length} total members!`,
description: `${
memes.filter(
(m) =>
m.presence?.status === 'online' ||
m.presence?.status === 'idle' ||
m.presence?.status === 'dnd'
).length
memes.filter((m) => m.presence?.status !== 'offline').length
} online members`,
color: COLORS.blue,
},

View file

@ -6,6 +6,7 @@ export const starsCommand = async (
) => {
await i.deferReply();
/* CHANGEME */
const count = await fetch('https://api.github.com/repos/PolyMC/PolyMC')
.then((r) => r.json() as Promise<{ stargazers_count: number }>)
.then((j) => j.stargazers_count);

View file

@ -25,10 +25,5 @@ export const COLORS = {
orange: 0xfb923c,
} as const;
export const ALLOWED_ROLES = [
'Alert',
'Events',
'Progress',
'Lenny is very special and thinks the UK needs a role',
'Roly Poly Cult',
];
/* CHANGEME */
export const ALLOWED_ROLES = ['Alert', 'Events', 'Progress'];

View file

@ -82,6 +82,7 @@ client.once('ready', async () => {
if (e.cleanContent.match(BuildConfig.ETA_REGEX)) {
await e.reply(
/* CHANGEME */
`${random(BuildConfig.ETA_MESSAGES)} <:pofat:964546613194420294>`
);
}
@ -111,6 +112,7 @@ client.on('interactionCreate', async (interaction) => {
await modrinthCommand(interaction);
} else if (commandName === 'rolypoly') {
await interaction.reply(
/* CHANGEME */
'https://media.discordapp.net/attachments/985048903126769764/985051373886382100/rollin-time.gif?width=324&height=216'
);
} else if (commandName === 'say') {

View file

@ -12,6 +12,7 @@ interface SimplifiedGHReleases {
// TODO: caching
export async function getLatestMinecraftVersion(): Promise<string> {
const f = await fetch(
/* CHANGEME */
'https://meta.polymc.org/v1/net.minecraft/package.json'
);
@ -21,6 +22,7 @@ export async function getLatestMinecraftVersion(): Promise<string> {
// TODO: caching
export async function getLatestPolyMCVersion(): Promise<string> {
/* CHANGEME */
const f = await fetch('https://api.github.com/repos/PolyMC/PolyMC/releases');
const versions = (await f.json()) as SimplifiedGHReleases[];