Skip to content

Commit 2731181

Browse files
committed
feat: log options for commands
1 parent 2671e46 commit 2731181

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/events/interactionCreate.ts

+18
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ export default {
2929
interaction.guildId ? `G ${interaction.guildId} | ` : ''
3030
}U ${interaction.user.id}] Processing command ${
3131
interaction.commandName
32+
}${
33+
interaction.options.data.length > 0
34+
? ` ${interaction.options.data
35+
.map(
36+
(option): string =>
37+
`${option.name}:${option.value}`,
38+
)
39+
.join(' ')}`
40+
: ''
3241
}`,
3342
label: 'Warden',
3443
});
@@ -164,6 +173,15 @@ export default {
164173
interaction.guildId ? `G ${interaction.guildId} | ` : ''
165174
}U ${interaction.user.id}] Executing command ${
166175
interaction.commandName
176+
}${
177+
interaction.options.data.length > 0
178+
? ` ${interaction.options.data
179+
.map(
180+
(option): string =>
181+
`${option.name}:${option.value}`,
182+
)
183+
.join(' ')}`
184+
: ''
167185
}`,
168186
label: 'Warden',
169187
});

0 commit comments

Comments
 (0)