Skip to content

[BUG] can't create a invite using channel.create_invite #972

@Wizzerinus

Description

@Wizzerinus

Describe the bug.

I am using get to grab the channel and then using create_invite to make a new invite into that channel. Instead of an invite, I get an error.

    channel = configuration.get_int('Discord.channels.applicant_info')
    channel_obj = await get(bot, Channel, object_id=channel)
    invite = await channel_obj.create_invite(max_uses=3, unique=True)

This is not a channel ID error, as otherwise I would get a "discord error with severity 40".

List the steps.

  1. Import the module in python
  2. Use get to get a channel
  3. Try to create an invite
  4. Observe the error

What you expected.

I get an Invite object

What you saw.

Instead, I received this traceback error given from my Python terminal:

Traceback (most recent call):
  File ".../interactions/api/models/channel.py", line 1102, in create_invite
    return Invite(**res, _client=self._client)
TypeError: interactions.api.models.guild.Invite() argument after ** must be a mapping, not NoneType

What version of the library did you use?

unstable

Version specification

Stable + commits 3da5183 (fix to get crash) and 3c377d49 (fix to member roles)

Code of Conduct

  • I agree to follow the contribution requirements.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions