Skip to content

Commit

Permalink
.2
Browse files Browse the repository at this point in the history
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
  • Loading branch information
cobaltt7 committed Sep 17, 2022
1 parent ed1a413 commit d75483e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ const info: ChatInputCommand = {
(name) =>
(name[0] || "").toUpperCase() +
name.slice(1),
) + " role",
)
.join(" ") + " role",
value: role[1]?.toString() || "*None*",
inline: true,
};
Expand Down
4 changes: 1 addition & 3 deletions common/xp.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,10 @@ export function getLevelForXp(xp) {
if (level === -2) {
let found = 0;
level = XP_PER_LEVEL.length;
while (!(found > xp)) {
while (found < xp) {
found = getXpForLevel(level);
level++;
}
}
return level;
}

await giveXp(await guild.members.fetch("987265192327004214"));
2 changes: 1 addition & 1 deletion events/message/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export default async function event(message) {
if (!newChannel) lastInChannel.pop();
lastInChannel.unshift(message);
const bot =
1 + +(message.interaction || /^(r!|<@323630372531470346>)\s*\w+/.test(message.content));
1 + +(!!message.interaction || /^(r!|<@323630372531470346>)\s*\w+/.test(message.content));

promises.push(
giveXp(
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scradd",
"version": "2.0.1",
"version": "2.0.2",
"private": true,
"description": "Custom Discord bot for the Scratch Addons server.",
"homepage": "https://discord.gg/FPv957V6SD",
Expand Down

0 comments on commit d75483e

Please sign in to comment.