Skip to content

Commit

Permalink
filter by servers with ssh only
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed Jun 15, 2024
1 parent f846077 commit 7677c29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/discord/modules/webhook-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default (bot: DiscordBot): void => {
const where =
override !== undefined
? bridge.servers.filter(s => override.split(",").includes(s.config.id.toString()))
: bridge.servers;
: bridge.servers.filter(s => !!s.config.ssh);

const allowed = (<Discord.GuildMemberRoleManager>ctx.member.roles).cache.some(
x => x.id === bot.config.roles.developer || x.id === bot.config.roles.administrator
Expand Down Expand Up @@ -133,7 +133,7 @@ export default (bot: DiscordBot): void => {
if (!bridge) return;
ctx.editReply(
`<@${ctx.user.id}> successfully updated ${
where.length === bridge.servers.length - 1 // idx 0 is empty
where.length === bridge.servers.length
? "all servers"
: where
.map(s =>
Expand Down Expand Up @@ -203,7 +203,7 @@ export default (bot: DiscordBot): void => {
if (!bridge) return;
ctx.editReply(
`<@${ctx.user.id}> successfully updated ${
where.length === bridge.servers.length - 1 // idx 0 is empty
where.length === bridge.servers.length
? "all servers"
: where
.map(s =>
Expand Down

0 comments on commit 7677c29

Please sign in to comment.