Skip to content

Conversation

@GeomKid
Copy link
Contributor

@GeomKid GeomKid commented Oct 26, 2022

About

This pull request is about fixing the issue of multiple client unable to load the commands from the same extension

bot1 = Client(
    token=login["token1"],
)
bot2 = Client(
    token=login["token2"],
)
for filename in os.listdir("./cogs"):
    if filename.endswith(".py"):
        bot1.load(f"cogs.{filename[:-3]}")
        bot2.load(f"cogs.{filename[:-3]}")

Will load the cogs into both Clients However due to some unidentified reasons the commands self.client will always be bot2

Checklist

  • The pre-commit code linter has been run over all edited files to ensure the code is linted.
  • I've ensured the change(s) work on 3.8.6 and higher.

I've made this pull request: (check all that apply)

  • For the documentation
  • To add a new feature
  • As a general enhancement
  • As a refactor of the library/the library's code
  • To fix an existing bug
  • To resolve #ISSUENUMBER

This is:

  • A breaking change

@Damego Damego changed the title [fix]the issue of multiple client unable to load the commands from the same extension fix: The issue of multiple client unable to load the commands from the same extension Nov 4, 2022
@GeomKid GeomKid requested review from Damego and EepyElvyra and removed request for Damego and EepyElvyra November 4, 2022 17:54
Copy link
Member

@Damego Damego left a comment

Choose a reason for hiding this comment

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

one thing

Copy link
Member

@Damego Damego left a comment

Choose a reason for hiding this comment

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

Okay it works fine for me

@GeomKid GeomKid requested a review from EepyElvyra November 5, 2022 08:42
@Damego Damego merged commit a95e2b7 into interactions-py:unstable Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants