snapshot_poker_phase3
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
const {
|
||||
getPokerService
|
||||
} = require("../../utils/crumbPoker");
|
||||
|
||||
const {
|
||||
deferPokerReply,
|
||||
editPokerError,
|
||||
buildJoinPicker
|
||||
} = require("../../utils/pokerDiscord");
|
||||
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"pokerBrowse",
|
||||
|
||||
async execute(
|
||||
interaction
|
||||
) {
|
||||
await deferPokerReply(
|
||||
interaction
|
||||
);
|
||||
|
||||
try {
|
||||
const tables =
|
||||
await getPokerService()
|
||||
.listJoinableTables({
|
||||
guildId:
|
||||
interaction.guildId,
|
||||
channelId:
|
||||
interaction.channelId
|
||||
});
|
||||
|
||||
return interaction.editReply(
|
||||
buildJoinPicker(
|
||||
tables
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
catch (error) {
|
||||
return editPokerError(
|
||||
interaction,
|
||||
error
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user