Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Solved - Kinda] Channel Rules not yet working on Discord #197

Open
Kickbut101 opened this issue Dec 12, 2019 · 1 comment
Open

[Solved - Kinda] Channel Rules not yet working on Discord #197

Kickbut101 opened this issue Dec 12, 2019 · 1 comment
Assignees
Labels
bug pinned Prevent closing if stale

Comments

@Kickbut101
Copy link

Kickbut101 commented Dec 12, 2019

It seems that no matter how I enter in the names of the channels my bot has access to the channel rules don't seem to be respected or work how I enter them.

Expected Behavior

Ability to filter which channels can use which plugins and commands in discord

Current Behavior

Unless the channel = '*' the channel I enter doesn't seem to be respected or adhered to at all in regards to the included and excluded commands. I don't think the backend correctly identifies the channels (or channel ids) right now to use the "channel rules"

Possible Solution

Have backend translate the user input channel name to the proper name/format/channelID

Steps to Reproduce (for bugs)

1.Change the default config from a channel = '*' to some other channel
2. Commands essentially stop working, if you decided to put something in the inclusion other than *

Your Environment

  • Module version used: 0.12
  • Operating System and PowerShell version: Win10 Powershell 5.1 I believe.

EDIT EDIT EDIT!! 12-13-19

What I was trying;

  ChannelRules = @(
  	@{
	Channel = '*'
	IncludeCommands = @('*')
    ExcludeCommands = @('MineCraft-Discord-Bot-Module:*')
	}
  ) 

AND

  ChannelRules = @(
  	@{
	Channel = '*general*'
	IncludeCommands = @('*')
    ExcludeCommands = @('MineCraft-Discord-Bot-Module:*')
	}
  )

AND
Many variations including the actual channel ID with \ or * or ! in front of it and behind it in all sorts of combinations.

What finally started working

  ChannelRules = @(
  	@{
	Channel = '*mcraft*'
	IncludeCommands = @(
	'MineCraft-Discord-Bot-Module:*'
	'*'
	)
    ExcludeCommands = @()
	}
	@{
	Channel = '*'
	IncludeCommands = @('*')
    ExcludeCommands = @('MineCraft-Discord-Bot-Module:*')
	}
  )

I believe the breakthrough here was that for some reason the asterisk wasn't actually wildcarding all of my commands as I had hoped, and beyond that I had to set the "inclusion" rule before the "exclusion" rule. (See the order that I listed the channel rules in "What finally started working" the channel where I wanted the specific module to work has to be listed before the catch-all exclusion of it.

Ugh. Definitely stupidity and misunderstanding on my part. I do wish however there was a more verbose logging in the logging that pertained to the channel rules matching. (Yes I had debug on).

@Kickbut101 Kickbut101 changed the title Channel Rules not yet working on Discord ? [Solved - Kinda] Channel Rules not yet working on Discord Dec 14, 2019
@devblackops devblackops self-assigned this Jan 13, 2020
@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 13, 2020
@stale stale bot closed this as completed Mar 27, 2020
@devblackops devblackops reopened this Mar 28, 2020
@stale stale bot removed the stale label Mar 28, 2020
@devblackops devblackops added the pinned Prevent closing if stale label Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pinned Prevent closing if stale
Projects
None yet
Development

No branches or pull requests

2 participants