Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

feat: allow disabling /command dm perms globally #672

Merged
merged 1 commit into from
Oct 17, 2022
Merged

Conversation

LordOfPolls
Copy link
Member

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

Allows for disabling interaction command dm_permission's globally

Changes

  • Add new client kwarg disable_dm_commands
  • On adding a command, if the above is enabled, sets the command's dm_permission to False

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@LordOfPolls LordOfPolls added the New Feature::Library A new feature for the library label Oct 15, 2022
Copy link
Collaborator

@Wolfhound905 Wolfhound905 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works if you never want to have any DM commands in your bot.

Copy link
Collaborator

@silasary silasary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why people want this, but sure, it works

@LordOfPolls LordOfPolls merged commit 61beb23 into 2.x Oct 17, 2022
@LordOfPolls LordOfPolls deleted the global-dm-toggle branch October 17, 2022 18:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
New Feature::Library A new feature for the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants