Add Guild.create_category.
An alias, Guild.create_category_channel is provided.
This commit is contained in:
parent
233c2d80ef
commit
7df8897e3d
@ -612,12 +612,22 @@ class Guild(Hashable):
|
|||||||
def create_voice_channel(self, name, *, overwrites=None, reason=None):
|
def create_voice_channel(self, name, *, overwrites=None, reason=None):
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
Same as :meth:`create_text_channel` except makes a
|
Same as :meth:`create_text_channel` except makes a :class:`VoiceChannel` instead.
|
||||||
:class:`VoiceChannel` instead.
|
|
||||||
"""
|
"""
|
||||||
data = yield from self._create_channel(name, overwrites, ChannelType.voice, reason=reason)
|
data = yield from self._create_channel(name, overwrites, ChannelType.voice, reason=reason)
|
||||||
return VoiceChannel(state=self._state, guild=self, data=data)
|
return VoiceChannel(state=self._state, guild=self, data=data)
|
||||||
|
|
||||||
|
@asyncio.coroutine
|
||||||
|
def create_category(self, name, *, overwrites=None, reason=None):
|
||||||
|
"""|coro|
|
||||||
|
|
||||||
|
Same as :meth:`create_text_channel` except makes a :class:`CategoryChannel` instead.
|
||||||
|
"""
|
||||||
|
data = yield from self._create_channel(name, overwrites, ChannelType.category, reason=reason)
|
||||||
|
return CategoryChannel(state=self._state, guild=self, data=data)
|
||||||
|
|
||||||
|
create_category_channel = create_category
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def leave(self):
|
def leave(self):
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user