Browse Source

Rename Invite.create -> create_for_channel

This was smashing a base model method
pull/27/head
Andrei 8 years ago
parent
commit
d9f619f007
  1. 4
      disco/types/invite.py

4
disco/types/invite.py

@ -1,4 +1,4 @@
from disco.types.base import SlottedModel, Field, datetime from disco.types.base import SlottedModel, Field, datetime
from disco.types.user import User from disco.types.user import User
from disco.types.guild import Guild from disco.types.guild import Guild
from disco.types.channel import Channel from disco.types.channel import Channel
@ -40,7 +40,7 @@ class Invite(SlottedModel):
created_at = Field(datetime) created_at = Field(datetime)
@classmethod @classmethod
def create(cls, channel, max_age=86400, max_uses=0, temporary=False, unique=False): def create_for_channel(cls, channel, max_age=86400, max_uses=0, temporary=False, unique=False):
return channel.client.api.channels_invites_create( return channel.client.api.channels_invites_create(
channel.id, channel.id,
max_age=max_age, max_age=max_age,

Loading…
Cancel
Save