|
| 1 | +import { type Snowflake, userMention } from "discord.js"; |
1 | 2 | import type { BotContext } from "@/context.js"; |
2 | 3 |
|
3 | 4 | import * as time from "@/utils/time.js"; |
4 | 5 | import * as lootService from "@/service/loot.js"; |
5 | 6 | import { LootAttributeKindId, LootKindId, resolveLootTemplate } from "@/service/lootData.js"; |
6 | 7 | import log from "@log"; |
7 | 8 | import { randomEntry } from "@/service/random.js"; |
8 | | -import { type Snowflake, userMention } from "discord.js"; |
9 | 9 |
|
10 | 10 | export async function degradeItems(_context: BotContext) { |
11 | 11 | log.info("Degrading loot items"); |
@@ -74,7 +74,7 @@ export async function exposeWithRadiation(context: BotContext) { |
74 | 74 | await context.textChannels.hauptchat.send({ |
75 | 75 | embeds: [ |
76 | 76 | { |
77 | | - description: `:radioactive: ${targetLoot.displayName} von <@${targetLoot.winnerId}> wurde verstrahlt. :radioactive:`, |
| 77 | + description: `:radioactive: ${targetLoot.displayName} von ${userMention(targetLoot.winnerId)} wurde verstrahlt. :radioactive:`, |
78 | 78 | footer: { |
79 | 79 | text: "Du solltest deinen Müll besser entsorgen", |
80 | 80 | }, |
@@ -139,7 +139,7 @@ export async function runHalfLife(context: BotContext) { |
139 | 139 | const decayStats = replacedStats |
140 | 140 | .entries() |
141 | 141 | .toArray() |
142 | | - .map(([user, count]) => `${count}x von <@${user}>`); |
| 142 | + .map(([user, count]) => `${count}x von ${userMention(user)}`); |
143 | 143 |
|
144 | 144 | await context.textChannels.hauptchat.send({ |
145 | 145 | embeds: [ |
|
0 commit comments