Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
xero-lib committed May 2, 2024
1 parent 453e343 commit df08a04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion commands/tsjoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default async function (interaction) {
.setAuthor({ name: interaction.user.username, iconURL: interaction.user.avatarURL() })
.setColor("Green")
.setTitle("Talking Stick:")
.addFields([{ name: `${interaction.user.tag} has the Talking Stick!`, value: `Currently in ${interaction.channel.name}` }])
.addFields([{ name: `${interaction.user.username} has the Talking Stick!`, value: `Currently in ${interaction.channel}` }])
.setFooter({ text: `To pass the Talking Stick, use /tspass <ping a user>` });

interaction.reply({ embeds: [tsEmbed] , ephemeral: false }).catch((e) =>
Expand Down
10 changes: 5 additions & 5 deletions commands/tsleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export default async function (interaction) {
interaction.member.permissions.has(PermissionsBitField.Flags.Administrator) ||
interaction.member.id == developer.id
)) {
if (interaction.member.voice.channel && type === "voice") {
if (interaction.member.voice.channelId && type === "voice") {
for (const [_, member] of interaction.guild.members.cache)
if (member.voice.channel && member.voice.channel === interaction.member.voice.channel) {
if (member.voice.channelId && member.voice.channelId === interaction.member.voice.channelId) {
member.voice.setMute(false).catch(datedErr);
member.roles.remove(holder_role).catch(datedErr);
member.roles.remove(listener_role).catch(datedErr);
Expand All @@ -39,7 +39,7 @@ export default async function (interaction) {
.setAuthor({ name: interaction.user.username, iconURL: interaction.user.avatarURL() })
.setColor("Green")
.setTitle("Talking Stick:")
.addFields([{ name: `${interaction.user.username} removed the Talking Stick.\n\tYou may now talk freely.`, value: `Removed from ${interaction.member.voice.channel}` }]);
.addFields([{ name: `${interaction.user.displayName} removed the Talking Stick.\n\n**You may now talk freely.**`, value: `Removed from ${interaction.member.voice.channel}` }]);

interaction.member.voice.channel.permissionOverwrites.edit(holder_role, { Speak: null }).catch(datedErr);
interaction.member.voice.channel.permissionOverwrites.edit(interaction.guild.roles.everyone, { Speak: null }).catch((e) => {
Expand All @@ -64,10 +64,10 @@ export default async function (interaction) {
}

tsLeaveEmbed
.setAuthor({ name: interaction.user.username, iconURL: interaction.user.avatarURL() })
.setAuthor({ name: interaction.user.displayName, iconURL: interaction.user.avatarURL() })
.setColor("Green")
.setTitle("Talking Stick")
.addFields([{ name: `${interaction.user.username} removed the Talking Stick.\nYou may now type freely.`, value: `Removed from ${interaction.channel.name}` }]);
.addFields([{ name: `${interaction.user.displayName} removed the Talking Stick.\nYou may now type freely.`, value: `Removed from ${interaction.channel.name}` }]);

interaction.reply({ embeds: [tsLeaveEmbed], ephemeral: false }).catch(datedErr);
}
Expand Down
2 changes: 1 addition & 1 deletion listeners/listenerOn/onMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default async function (message) {
developer.send({ embeds: [dmEmbed] })
.then(() => message.react("✅"))
.catch((e) => {
console.error(date(),`Error sending message from ${message.author.username}#${message.author.discriminator} (${message.author.id}):`,e)
console.error(date(),`Error sending message from ${message.author.username} (${message.author.id}):`,e)
message.channel.send("There was an error sending the message, try again in a little while, add Thoth#6134, or join the support server: https://discord.gg/Jxe7mK2dHT");
});

Expand Down
1 change: 1 addition & 0 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Todo
- [ ] Properly set hoist levels for created roles, and ensure that talking stick role is above all roles that should be affected
- [x] Finish refractoring
- [x] Make `tempX` prototypes return the promise instead of attempting to resolve them in the methods themselves
- [ ] Implement the option for a queue and timer so that the stick is automatically passed to the next person after a specified amount of time
Expand Down

0 comments on commit df08a04

Please sign in to comment.