mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
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):
|
||||
"""|coro|
|
||||
|
||||
Same as :meth:`create_text_channel` except makes a
|
||||
:class:`VoiceChannel` instead.
|
||||
Same as :meth:`create_text_channel` except makes a :class:`VoiceChannel` instead.
|
||||
"""
|
||||
data = yield from self._create_channel(name, overwrites, ChannelType.voice, reason=reason)
|
||||
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
|
||||
def leave(self):
|
||||
"""|coro|
|
||||
|
Loading…
x
Reference in New Issue
Block a user