generated from nhcarrigan/template
Compare commits
2 Commits
483d5e8b9e
...
2543341d3c
| Author | SHA1 | Date | |
|---|---|---|---|
| 2543341d3c | |||
| 71566a83ed |
@@ -0,0 +1,3 @@
|
||||
# Code of Conduct
|
||||
|
||||
Our Code of Conduct can be found here: https://docs.nhcarrigan.com/#/coc
|
||||
@@ -27,16 +27,19 @@ export const leaderboard: Command = async(pavelle, interaction) => {
|
||||
});
|
||||
|
||||
const topTen = sorted.slice(0, 10).map((member, index) => {
|
||||
return `- **#${index.toString()}:** <@${member.userId}> - ${member.points.toString()} point(s).`;
|
||||
return `- **#${(index + 1).toString()}:** <@${member.userId}> - ${member.points.toString()} point(s).`;
|
||||
}).
|
||||
join("\n");
|
||||
const yourScore = sorted.find((member) => {
|
||||
return member.userId === interaction.member.id;
|
||||
});
|
||||
const yourRank = yourScore
|
||||
? `You are rank #${sorted.indexOf(yourScore).toString()} with ${yourScore.points.toString()} points.`
|
||||
? `You are rank #${(sorted.indexOf(yourScore) + 1).toString()} with ${yourScore.points.toString()} points.`
|
||||
: "You are not ranked. Try throwing some stuff!";
|
||||
await interaction.editReply({
|
||||
allowedMentions: {
|
||||
parse: [],
|
||||
},
|
||||
components: [
|
||||
{
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Discord API convention.
|
||||
|
||||
@@ -87,7 +87,7 @@ export const throwCmd: Command = async(pavelle, interaction) => {
|
||||
);
|
||||
await interaction.editReply({
|
||||
allowedMentions: {
|
||||
parse: [ "users" ],
|
||||
parse: [ ],
|
||||
},
|
||||
components: components,
|
||||
flags: [ MessageFlags.IsComponentsV2 ],
|
||||
|
||||
Reference in New Issue
Block a user