API Reference

The following section outlines the API of guilded.py.

Note

This module uses the Python logging module to log diagnostic and errors in an output independent way. If the logging module is not configured, these logs will not be output anywhere. See Setting Up Logging for more information on how to set up and use the logging module.

Clients

Client

class guilded.Client(*, internal_server_id=None, max_messages=..., features=None, **options)

The basic client class for interfacing with Guilded.

Parameters
  • internal_server_id (Optional[str]) – The ID of the bot’s internal server.

  • max_messages (Optional[int]) – The maximum number of messages to store in the internal message cache. This defaults to 1000. Passing in None disables the message cache.

  • features (Optional[ClientFeatures]) – Client features to opt in or out of.

loop

The event loop that the client uses for HTTP requests and websocket operations.

Type

asyncio.AbstractEventLoop

ws

The websocket gateway the client is currently connected to. Could be None.

Type

Optional[GuildedWebsocket]

internal_server_id

The ID of the bot’s internal server.

Type

Optional[str]

max_messages

The maximum number of messages to store in the internal message cache. This defaults to 1000. Passing in None disables the message cache.

Type

Optional[int]

features

The features that are enabled or disabled for the client.

Type

ClientFeatures

property user

The in-Guilded user data of the client. None if not logged in.

Type

Optional[ClientUser]

property cached_messages

The list of cached messages that the client has seen recently.

Type

List[ChatMessage]

property emotes

The list of emotes that the client can see.

Type

List[Emote]

property servers

The list of servers that the client can see.

Type

List[Server]

property users

The list of users that the client can see. A user is not the same as a member, which is a server-specific representation. To get all members, use get_all_members().

Type

List[User]

property dm_channels

The private/DM channels that the client can see.

Type

List[DMChannel]

property private_channels

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of dm_channels.

The private/DM channels that the client can see.

Type

List[DMChannel]

property guilds

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of servers.

The list of servers that the client can see.

Type

List[Server]

for ... in get_all_channels()

A generator that retrieves every ServerChannel the client can see.

This is equivalent to:

for server in client.servers:
    for channel in server.channels:
        yield channel
Yields

ServerChannel – A channel the client can see.

for ... in get_all_members()

Returns a generator yielding every Member that the client can see.

This is equivalent to:

for server in client.servers:
    for member in server.members:
        yield member
Yields

Member – A member the client can see.

await wait_until_ready()

This function is a coroutine.

Waits until the client’s internal cache is all ready.

await setup_hook()

This function is a coroutine.

A coroutine to be called to setup the bot, by default this is blank. To perform asynchronous setup after the bot is logged in but before it has connected to the Websocket, overwrite this method.

This is only called once, in login(), and will be called before any events are dispatched, making it a better solution than doing such setup in the on_ready() event.

Warning

Since this is called before the websocket connection is made therefore anything that waits for the websocket will deadlock, this includes things like wait_for() and wait_until_ready().

wait_for(event, *, check=None, timeout=None)

This function is a coroutine.

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The timeout parameter is passed onto asyncio.wait_for(). By default, it does not timeout. Note that this does propagate the asyncio.TimeoutError for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a tuple containing those arguments is returned instead. Please check the documentation for a list of events and their parameters.

This function returns the first event that meets the requirements.

Examples

Waiting for a user reply:

@client.event
async def on_message(message):
    if message.content.startswith('$greet'):
        channel = message.channel
        await channel.send('Say hello!')

        def check(m):
            return m.content == 'hello' and m.channel == channel

        msg = await client.wait_for('message', check=check)
        await channel.send(f'Hello {msg.author}!')

Waiting for a thumbs up reaction from the message author:

@client.event
async def on_message(message):
    if message.content.startswith('$thumb'):
        channel = message.channel
        await channel.send('Send me that 👍 reaction, mate')

        def check(reaction):
            return reaction.user == message.author and reaction.emote.id == 90001164  # https://gist.github.com/shayypy/8e492ad2d8801bfd38415986f68a547e

        try:
            reaction = await client.wait_for('message_reaction_add', timeout=60.0, check=check)
        except asyncio.TimeoutError:
            await channel.send('👎')
        else:
            await channel.send('👍')
Parameters
  • event (str) – The event name, similar to the event reference, but without the on_ prefix, to wait for.

  • check (Optional[Callable[…, bool]]) – A predicate to check what to wait for. The arguments must meet the parameters of the event being waited for.

  • timeout (Optional[float]) – The number of seconds to wait before timing out and raising asyncio.TimeoutError.

Raises

asyncio.TimeoutError – If a timeout is provided and it was reached.

Returns

Returns no arguments, a single argument, or a tuple of multiple arguments that mirrors the parameters passed in the event reference.

Return type

Any

event(coro)

A decorator to register an event for the library to automatically dispatch when appropriate.

You can find more info about the events on the documentation below.

The events must be a coroutine, if not, TypeError is raised.

Example

@client.event
async def on_ready():
    print('Ready!')
Raises

TypeError – The function passed is not actually a coroutine.

get_partial_messageable(id, *, server_id=None, group_id=None, type=None, guild_id=None)

Returns a partial messageable with the given channel ID.

This is useful if you have a channel ID but don’t want to do an API call to send messages to it.

New in version 1.4.

Parameters
  • id (str) – The channel ID to create a partial messageable for.

  • server_id (Optional[str]) – The server ID that the channel is in. This is not required to send messages, but it is necessary for the jump_url and server properties to work properly.

  • group_id (Optional[str]) – The group ID that the channel is in. This is not required to send messages, but when combined with server_id, it helps the jump_url property to render properly in the client, and it allows the group property to work properly.

  • type (Optional[ChannelType]) – The underlying channel type for the partial messageable. This does not have to be a messageable type, but Guilded will reject the request if you attempt to send to a non-messageable channel.

Returns

The partial messageable that was created.

Return type

PartialMessageable

Raises

ValueError – Cannot provide both server_id and guild_id

get_message(message_id, /)

Optional[ChatMessage]: Get a message from your cached_messages.

As messages frequently enter and exit cache, you generally should not rely on this method. Instead, use abc.Messageable.fetch_message().

get_server(server_id, /)

Optional[Server]: Get a server from your servers.

get_user(user_id, /)

Optional[User]: Get a user from your users.

get_channel(channel_id, /)

Optional[ServerChannel]: Get a server channel or DM channel from your channels.

get_emote(emote_id, /)

Optional[Emote]: Get an emote from your emotes.

await fetch_user(user_id, /)

This function is a coroutine.

Fetch a user from the API.

Returns

The user from the ID.

Return type

User

await getch_user(user_id, /)

This function is a coroutine.

Try to get a user from internal cache, and if not found, try to fetch from the API.

Returns

The user from the ID.

Return type

User

await fetch_public_server(server_id, /)

This function is a coroutine.

Fetch a public server from the API.

The client does not need to be a member of the server to use this method, but the server must have “Discoverable” enabled in its privacy settings.

This method will be limiting for you if you are a member of the server and are permitted to see non-public information. If this is the case, use fetch_server() instead.

Returns

The server from the ID.

Return type

Server

Raises

NotFound – The server does not exist or it is private.

await fetch_server(server_id, /)

This function is a coroutine.

Fetch a server from the API.

Returns

The server from the ID.

Return type

Server

await getch_server(server_id, /)

This function is a coroutine.

Try to get a server from internal cache, and if not found, try to fetch from the API.

Returns

The server from the ID.

Return type

Server

await fetch_servers()

This function is a coroutine.

Fetch your list of servers from the API.

New in version 1.8.

Returns

The servers you are a member of.

Return type

List[Server]

await fetch_channel(channel_id)

This function is a coroutine.

Fetch a channel from the API.

Returns

The channel from the ID.

Return type

ServerChannel

await getch_channel(channel_id)

This function is a coroutine.

Try to get a channel from internal cache, and if not found, try to fetch from the API.

Returns

The channel from the ID.

Return type

ServerChannel

await fetch_invite(invite_id)

This function is a coroutine.

Fetch an invite from the API.

Note

This method does not support vanity invites or full URLs.

Returns

The invite from the ID.

Return type

Invite

await set_status(emote, *, content=...)

This function is a coroutine.

Update your custom status.

This method cannot be used to remove your status. Instead, use remove_status().

Parameters
  • emote (Emote) –

    The emote displayed to the left of the content.

    Note

    Perhaps unexpectedly, this parameter is required by Guilded. If you do not wish to provide it, 90002547 is the default emote ID used by the desktop client.

  • content (Optional[str]) – The text content of the status.

await remove_status()

This function is a coroutine.

Remove your custom status.

await close()

This function is a coroutine.

Close the current connection.

run(token, *, reconnect=True)

Connect to Guilded’s gateway and start the event loop. This is a blocking call; nothing after it will be called until the bot has been closed.

Parameters
  • token (str) – The bot’s auth token.

  • reconnect (Optional[bool]) – Whether to reconnect on loss/interruption of gateway connection.

Event Reference

This section outlines the different types of events listened by Client.

If an event handler raises an exception, on_error() will be called to handle it, which defaults to print a traceback and ignoring the exception.

You may be interested in the opt-in event style experiment, which is available post-version 1.3.0. If you have this experiment enabled, event handlers that correspond to real gateway messages will receive an instance of a BaseEvent subclass as their single parameter. This is denoted below with notes linking back to this section.

Warning

Event functions must be a coroutine.

Announcements

guilded.on_announcement_create(event)

This event will only be dispatched if the event style experiment is enabled.

A announcement was created in an announcement channel.

Parameters

event (AnnouncementCreateEvent) – The event containing the payload.

guilded.on_announcement_update(event)

This event will only be dispatched if the event style experiment is enabled.

A announcement was updated in an announcement channel.

Parameters

event (AnnouncementUpdateEvent) – The event containing the payload.

guilded.on_announcement_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A announcement was deleted in an announcement channel.

Parameters

event (AnnouncementDeleteEvent) – The event containing the payload.

guilded.on_announcement_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to an announcement.

Parameters

event (AnnouncementReactionAddEvent) – The event containing the payload.

guilded.on_announcement_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from an announcement.

Parameters

event (AnnouncementReactionRemoveEvent) – The event containing the payload.

guilded.on_announcement_reply_create(event)

This event will only be dispatched if the event style experiment is enabled.

A reply was created under an announcement.

Parameters

event (AnnouncementReplyCreateEvent) – The event containing the payload.

guilded.on_announcement_reply_update(event)

This event will only be dispatched if the event style experiment is enabled.

A announcement reply was updated.

Parameters

event (AnnouncementReplyUpdateEvent) – The event containing the payload.

guilded.on_announcement_reply_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A announcement reply was deleted.

Parameters

event (AnnouncementReplyDeleteEvent) – The event containing the payload.

guilded.on_announcement_reply_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a reply under an announcement.

Parameters

event (AnnouncementReplyReactionAddEvent) – The event containing the payload.

guilded.on_announcement_reply_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a reply under an announcement.

Parameters

event (AnnouncementReplyReactionRemoveEvent) – The event containing the payload.

Bots

guilded.on_bot_add(server, member)

The client user was added to a server.

If you are using the event style experiment, this event takes a single parameter: BotAddEvent

Parameters
  • server (Server) – The server that the bot was added to.

  • member (Optional[Member]) – The member that added the bot to the server. This may be None, but it is unlikely in most cases.

guilded.on_bot_remove(server, member)

The client user was removed from a server.

If you are using the event style experiment, this event takes a single parameter: BotRemoveEvent

Parameters
  • server (Server) – The server that the bot was removed from.

  • member (Optional[Member]) – The member that removed the bot from the server. This may be None, especially when the server was not previously cached.

Calendar Events

guilded.on_calendar_event_create(event)

A calendar event was created in a calendar channel.

If you are using the event style experiment, this event takes a single parameter: CalendarEventCreateEvent

Parameters

event (CalendarEvent) – The event that was created.

guilded.on_calendar_event_update(event)

This event will only be dispatched if the event style experiment is enabled.

A calendar event was updated in a calendar channel.

Parameters

event (CalendarEventUpdateEvent) – The event containing the payload.

guilded.on_raw_calendar_event_update(event)

If the event style experiment is enabled, this event will never be dispatched.

A calendar event was updated in a calendar channel.

Parameters

event (CalendarEvent) – The event that was updated.

guilded.on_calendar_event_delete(event)

A calendar event was deleted in a calendar channel.

If you are using the event style experiment, this event takes a single parameter: CalendarEventDeleteEvent

Parameters

event (CalendarEvent) – The event that was deleted.

guilded.on_calendar_event_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a calendar event.

Parameters

event (CalendarEventReactionAddEvent) – The event containing the payload.

guilded.on_calendar_event_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a calendar event.

Parameters

event (CalendarEventReactionRemoveEvent) – The event containing the payload.

guilded.on_calendar_event_reply_create(event)

This event will only be dispatched if the event style experiment is enabled.

A reply was created under a calendar event.

Parameters

event (CalendarEventReplyCreateEvent) – The event containing the payload.

guilded.on_calendar_event_reply_update(event)

This event will only be dispatched if the event style experiment is enabled.

A calendar event reply was updated.

Parameters

event (CalendarEventReplyUpdateEvent) – The event containing the payload.

guilded.on_calendar_event_reply_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A calendar event reply was deleted.

Parameters

event (CalendarEventReplyDeleteEvent) – The event containing the payload.

guilded.on_calendar_event_reply_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a reply under a calendar event.

Parameters

event (CalendarEventReplyReactionAddEvent) – The event containing the payload.

guilded.on_calendar_event_reply_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a reply under a calendar event.

Parameters

event (CalendarEventReplyReactionRemoveEvent) – The event containing the payload.

guilded.on_rsvp_update(event)

This event will only be dispatched if the event style experiment is enabled.

An RSVP to a calendar event was created or deleted.

Parameters

event (RsvpUpdateEvent) – The event containing the payload.

guilded.on_raw_calendar_event_rsvp_update(event)

If the event style experiment is enabled, this event will never be dispatched.

An RSVP to a calendar event was created or deleted.

Parameters

rsvp (CalendarEventRSVP) – The RSVP that was created or updated.

guilded.on_bulk_rsvp_create(event)

This event will only be dispatched if the event style experiment is enabled.

One or multiple RSVPs to a calendar event were created in bulk.

Parameters

event (BulkRsvpCreateEvent) – The event containing the payload.

guilded.on_bulk_calendar_event_rsvp_create(rsvps)

If the event style experiment is enabled, this event will never be dispatched.

One or multiple RSVPs to a calendar event were created in bulk.

Parameters

rsvps (List[CalendarEventRSVP]) – The RSVPs that were created.

guilded.on_rsvp_delete(event)

This event will only be dispatched if the event style experiment is enabled.

An RSVP to a calendar event was deleted.

Parameters

event (RsvpDeleteEvent) – The event containing the payload.

guilded.on_calendar_event_rsvp_delete(event)

If the event style experiment is enabled, this event will never be dispatched.

An RSVP to a calendar event was deleted.

Parameters

rsvp (CalendarEventRSVP) – The rsvp that was deleted.

Channels

guilded.on_category_create(category)

A channel category was created in a server.

If you are using the event style experiment, this event takes a single parameter: CategoryCreateEvent

Parameters

category (Category) – The category that was created.

guilded.on_category_update(before, after)

A channel category was updated.

If you are using the event style experiment, this event takes a single parameter: CategoryUpdateEvent

Parameters
  • before (Category) – The category before being updated.

  • after (Category) – The category that was updated.

guilded.on_category_delete(category)

A channel category was deleted.

If you are using the event style experiment, this event takes a single parameter: CategoryDeleteEvent

Parameters

category (Category) – The category that was deleted.

guilded.on_server_channel_create(channel)

A channel was created in a server.

If you are using the event style experiment, this event takes a single parameter: ServerChannelCreateEvent

Parameters

channel (abc.ServerChannel) – The channel that was created.

guilded.on_server_channel_update(before, after)

A server channel was updated.

If you are using the event style experiment, this event takes a single parameter: ServerChannelUpdateEvent

Parameters
guilded.on_server_channel_delete(channel)

A server channel was deleted.

If you are using the event style experiment, this event takes a single parameter: ServerChannelDeleteEvent

Parameters

channel (abc.ServerChannel) – The channel that was deleted.

Debug

guilded.on_error(event, *args, **kwargs)

Usually when an event raises an uncaught exception, a traceback is printed to stderr and the exception is ignored. If you want to change this behaviour and handle the exception for whatever reason yourself, this event can be overridden. Which, when done, will suppress the default action of printing the traceback.

The information of the exception raised and the exception itself can be retrieved with a standard call to sys.exc_info().

If you want exception to propagate out of the Client class you can define an on_error handler consisting of a single empty The raise statement. Exceptions raised by on_error will not be handled in any way by Client.

Parameters
  • event (str) – The name of the event that raised the exception.

  • args – The positional arguments for the event that raised the exception.

  • kwargs – The keyword arguments for the event that raised the exception.

guilded.on_socket_raw_receive(msg)

Called whenever a message is received from the gateway. The data provided here is not parsed in any way. This event is dispatched before the library does anything else with the data.

Parameters

msg (str) – The message received from the WebSocket connection

Docs

guilded.on_doc_create(event)

This event will only be dispatched if the event style experiment is enabled.

A doc was created in a docs channel.

Parameters

event (DocCreateEvent) – The event containing the payload.

guilded.on_doc_update(event)

This event will only be dispatched if the event style experiment is enabled.

A doc was updated in a docs channel.

Parameters

event (DocUpdateEvent) – The event containing the payload.

guilded.on_doc_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A doc was deleted in a docs channel.

Parameters

event (DocDeleteEvent) – The event containing the payload.

guilded.on_doc_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a doc.

Parameters

event (DocReactionAddEvent) – The event containing the payload.

guilded.on_doc_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a doc.

Parameters

event (DocReactionRemoveEvent) – The event containing the payload.

guilded.on_doc_reply_create(event)

This event will only be dispatched if the event style experiment is enabled.

A reply was created under a doc.

Parameters

event (DocReplyCreateEvent) – The event containing the payload.

guilded.on_doc_reply_update(event)

This event will only be dispatched if the event style experiment is enabled.

A doc reply was updated.

Parameters

event (DocReplyUpdateEvent) – The event containing the payload.

guilded.on_doc_reply_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A doc reply was deleted.

Parameters

event (DocReplyDeleteEvent) – The event containing the payload.

guilded.on_doc_reply_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a reply under a doc.

Parameters

event (DocReplyReactionAddEvent) – The event containing the payload.

guilded.on_doc_reply_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a reply under a doc.

Parameters

event (DocReplyReactionRemoveEvent) – The event containing the payload.

Forums

guilded.on_forum_topic_create(topic)

A forum topic was created.

If you are using the event style experiment, this event takes a single parameter: ForumTopicCreateEvent

Parameters

topic (ForumTopic) – The topic that was created.

guilded.on_forum_topic_update(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic was updated.

Parameters

event (ForumTopicUpdateEvent) – The event containing the payload.

guilded.on_raw_forum_topic_update(topic)

If the event style experiment is enabled, this event will never be dispatched.

A forum topic was updated.

Parameters

topic (ForumTopic) – The topic that was updated.

guilded.on_forum_topic_delete(topic)

A forum topic was deleted.

If you are using the event style experiment, this event takes a single parameter: ForumTopicDeleteEvent

Parameters

topic (ForumTopic) – The topic that was deleted.

guilded.on_forum_topic_pin(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic was pinned.

Parameters

event (ForumTopicPinEvent) – The event containing the payload.

guilded.on_forum_topic_unpin(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic was unpinned.

Parameters

event (ForumTopicUnpinEvent) – The event containing the payload.

guilded.on_forum_topic_lock(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic was locked.

Parameters

event (ForumTopicLockEvent) – The event containing the payload.

guilded.on_forum_topic_unlock(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic was unlocked.

Parameters

event (ForumTopicUnlockEvent) – The event containing the payload.

guilded.on_forum_topic_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a forum topic.

Parameters

event (ForumTopicReactionAddEvent) – The event containing the payload.

guilded.on_forum_topic_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a forum topic.

Parameters

event (ForumTopicReactionRemoveEvent) – The event containing the payload.

guilded.on_forum_topic_reply_create(event)

This event will only be dispatched if the event style experiment is enabled.

A reply was created under a forum topic.

Parameters

event (ForumTopicReplyCreateEvent) – The event containing the payload.

guilded.on_forum_topic_reply_update(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic reply was updated.

Parameters

event (ForumTopicReplyUpdateEvent) – The event containing the payload.

guilded.on_forum_topic_reply_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A forum topic reply was deleted.

Parameters

event (ForumTopicReplyDeleteEvent) – The event containing the payload.

guilded.on_forum_topic_reply_reaction_add(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was added to a reply under a forum topic.

Parameters

event (ForumTopicReplyReactionAddEvent) – The event containing the payload.

guilded.on_forum_topic_reply_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

A reaction was removed from a reply under a forum topic.

Parameters

event (ForumTopicReplyReactionRemoveEvent) – The event containing the payload.

Gateway

guilded.on_ready()

Called when the client has connected to the gateway and filled its internal cache automatically.

Warning

This event will be called multiple times thoughout a process’s lifetime when the client resumes dropped gateway connections, so you should not do anything in a ready handler that you do not want to be done twice.

For initial setup like loading extensions and cogs, use Client.setup_hook().

guilded.on_connect()

Called when the client has successfully connected to Guilded. This is not the same as the client being fully prepared, see on_ready() for that.

guilded.on_disconnect()

Called when the client has disconnected from Guilded. This could happen either through the internet being disconnected, explicit calls to Client.close(), or Guilded terminating the connection one way or the other.

This function can be called many times without a corresponding on_connect() call.

Groups

guilded.on_group_create(group)

A group was created in a server.

If you are using the event style experiment, this event takes a single parameter: GroupCreateEvent

Parameters

group (Group) – The group that was created.

guilded.on_group_update(event)

This event will only be dispatched if the event style experiment is enabled.

A group was updated in a server.

Parameters

event (GroupUpdateEvent) – The event containing the payload.

guilded.on_raw_group_update(group)

If the event style experiment is enabled, this event will never be dispatched.

A group was updated in a server.

Parameters

group (Group) – The group that was updated.

guilded.on_group_delete(group)

A group was deleted in a server.

If you are using the event style experiment, this event takes a single parameter: GroupDeleteEvent

Parameters

group (Group) – The group that was deleted.

List Items

guilded.on_list_item_create(event)

This event will only be dispatched if the event style experiment is enabled.

A list item was created.

Parameters

event (ListItemCreateEvent) – The event containing the payload.

guilded.on_list_item_update(event)

This event will only be dispatched if the event style experiment is enabled.

A list item was updated.

Parameters

event (ListItemUpdateEvent) – The event containing the payload.

guilded.on_list_item_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A list item was deleted.

Parameters

event (ListItemDeleteEvent) – The event containing the payload.

guilded.on_list_item_complete(event)

This event will only be dispatched if the event style experiment is enabled.

A list item was marked as complete.

Parameters

event (ListItemPinEvent) – The event containing the payload.

guilded.on_list_item_uncomplete(event)

This event will only be dispatched if the event style experiment is enabled.

A list item was unmarked as complete.

Parameters

event (ListItemUnpinEvent) – The event containing the payload.

Members

guilded.on_member_join(member)

A member joined a server.

This event will also be dispatched if the member is the current user, which is a case you may want to explicitly ignore.

If you are using the event style experiment, this event takes a single parameter: MemberJoinEvent

Parameters

member (Member) – The member that joined.

guilded.on_member_remove(member)

A member left or was forcibly removed from their server.

This event encompasses three cases of member removal. If the style experiment is disabled, you must use on_member_leave(), on_member_kick(), or on_member_ban() to fine-tune which cases you process in your code. Otherwise, you can check the attributes on the dispatched MemberRemoveEvent object.

If you are using the event style experiment, this event takes a single parameter: MemberRemoveEvent

Parameters

member (Member) – The member that was removed.

guilded.on_member_leave(member)

If the event style experiment is enabled, this event will never be dispatched.

A member manually left their server or their account was deleted.

Parameters

member (Member) – The member that left.

guilded.on_member_kick(member)

If the event style experiment is enabled, this event will never be dispatched.

A member was kicked from their server.

Parameters

member (Member) – The member that was kicked.

guilded.on_member_ban(member)

If the event style experiment is enabled, this event will never be dispatched.

A member was banned from their server.

Parameters

member (Member) – The member that was banned.

guilded.on_member_update(before, after)

A member was updated.

If the style experiment is disabled, then this event is only dispatched if the member was cached before being updated.

Any of the following attributes may have changed to cause this event to be dispatched:

  • Member.nickname

If you are using the event style experiment, this event takes a single parameter: MemberUpdateEvent

Parameters
  • before (Member) – The member before they were updated.

  • after (Member) – The member that was updated.

This event will only be dispatched if the event style experiment is enabled.

A member created a social link on their profile.

Parameters

event (MemberSocialLinkCreateEvent) – The event containing the payload.

This event will only be dispatched if the event style experiment is enabled.

A member updated one of their profile social links.

Parameters

event (MemberSocialLinkUpdateEvent) – The event containing the payload.

This event will only be dispatched if the event style experiment is enabled.

A member deleted one of their profile social links.

Parameters

event (MemberSocialLinkDeleteEvent) – The event containing the payload.

guilded.on_ban_create(event)

This event will only be dispatched if the event style experiment is enabled.

A ban was created in a server (a member was banned). This is not necessarily equivalent to member removal.

Parameters

event (BanCreateEvent) – The event containing the payload.

guilded.on_ban_delete(event)

This event will only be dispatched if the event style experiment is enabled.

A ban was deleted in a server (a member was unbanned).

Parameters

event (BanDeleteEvent) – The event containing the payload.

guilded.on_bulk_member_roles_update(event)

This event will only be dispatched if the event style experiment is enabled.

A member’s roles were updated.

Parameters

event (BulkMemberRolesUpdateEvent) – The event containing the payload.

guilded.on_bulk_member_xp_add(event)

This event will only be dispatched if the event style experiment is enabled.

One or more members were awarded XP.

Parameters

event (BulkMemberXpAddEvent) – The event containing the payload.

Messages

guilded.on_message(message)

A message was sent in a server or DM.

If you are using the event style experiment, this event takes a single parameter: MessageEvent

Parameters

message (ChatMessage) – The message that was sent.

guilded.on_message_edit(before, after)

If the event style experiment is enabled, this event will never be dispatched.

A message was updated.

This event is only dispatched if the message was cached before being updated. If you want to handle message updates regardless of state, see on_raw_message_edit().

Parameters
  • before (ChatMessage) – The message before it was edited.

  • after (ChatMessage) – The message that was edited in its current state.

guilded.on_message_update(event)

This event will only be dispatched if the event style experiment is enabled.

A message was updated.

Parameters

event (MessageUpdateEvent) – The event containing the payload.

guilded.on_message_delete(message)

A message was deleted.

If you are using the event style experiment, this event takes a single parameter: MessageDeleteEvent

Parameters

message (Message) – The message that was deleted.

guilded.on_raw_message_delete(data)

If the event style experiment is enabled, this event will never be dispatched.

A message was deleted.

Deprecated since version 1.11: The non-raw version of this event no longer relies on message cache. Use on_message_delete() instead.

Parameters

data (dict) –

guilded.on_message_reaction_add(reaction)

A reaction was added to a message.

If you are using the event style experiment, this event takes a single parameter: MessageReactionAddEvent

Parameters

reaction (Reaction) – The reaction that was added.

guilded.on_message_reaction_remove(reaction)

A reaction was removed from a message.

If you are using the event style experiment, this event takes a single parameter: MessageReactionRemoveEvent

Parameters

reaction (Reaction) – The reaction that was removed.

guilded.on_bulk_message_reaction_remove(event)

This event will only be dispatched if the event style experiment is enabled.

One or multiple reactions were bulk removed from a message.

Parameters

event (BulkMessageReactionRemoveEvent) – The event containing the payload.

Roles

guilded.on_role_create(role)

A role was created in a server.

If you are using the event style experiment, this event takes a single parameter: RoleCreateEvent

Parameters

role (Role) – The role that was created.

guilded.on_role_update(before, after)

A role was updated.

If you are using the event style experiment, this event takes a single parameter: RoleUpdateEvent

Parameters
  • before (Role) – The role before modification.

  • after (Role) – The role after modification.

guilded.on_role_delete(role)

A role was deleted.

If you are using the event style experiment, this event takes a single parameter: RoleDeleteEvent

Parameters

role (Role) – The role that was deleted.

guilded.on_channel_role_override_create(override)

A role override was created in a channel.

If you are using the event style experiment, this event takes a single parameter: ChannelRoleOverrideCreateEvent

Parameters

override (ChannelRoleOverride) – The override that was created.

guilded.on_raw_channel_role_override_update(override)

If the event style experiment is enabled, this event will never be dispatched.

A role override was updated.

Parameters

override (ChannelRoleOverride) – The override after modification.

guilded.on_channel_role_override_update(event)

This event will only be dispatched if the event style experiment is enabled.

A role override was updated.

Parameters

event (ChannelRoleOverrideUpdateEvent) – The event containing the payload.

guilded.on_channel_role_override_delete(override)

A role override was deleted.

If you are using the event style experiment, this event takes a single parameter: ChannelRoleOverrideDeleteEvent

Parameters

override (ChannelRoleOverride) – The override that was deleted.

guilded.on_category_role_override_create(override)

A role override was created in a category.

If you are using the event style experiment, this event takes a single parameter: CategoryRoleOverrideCreateEvent

Parameters

override (CategoryRoleOverride) – The override that was created.

guilded.on_raw_category_role_override_update(override)

If the event style experiment is enabled, this event will never be dispatched.

A role override was updated.

Parameters

override (CategoryRoleOverride) – The override after modification.

guilded.on_category_role_override_update(event)

This event will only be dispatched if the event style experiment is enabled.

A role override was updated.

Parameters

event (CategoryRoleOverrideUpdateEvent) – The event containing the payload.

guilded.on_category_role_override_delete(override)

A role override was deleted.

If you are using the event style experiment, this event takes a single parameter: CategoryRoleOverrideDeleteEvent

Parameters

override (CategoryRoleOverride) – The override that was deleted.

Webhooks

guilded.on_webhook_create(webhook)

A webhook was created in a server.

If you are using the event style experiment, this event takes a single parameter: WebhookCreateEvent

Parameters

webhook (Webhook) – The webhook that was created.

guilded.on_webhook_update(event)

This event will only be dispatched if the event style experiment is enabled.

A webhook was updated or deleted in a server.

Parameters

event (WebhookUpdateEvent) – The event containing the payload.

guilded.on_raw_webhook_update(webhook)

If the event style experiment is enabled, this event will never be dispatched.

A webhook was updated or deleted in a server.

If the webhook was deleted, its Webhook.deleted_at attribute will be set.

Parameters

webhook (Webhook) – The webhook that was updated.

Users

guilded.on_user_status_create(user, status, expires_at)

A user set their status.

If you are using the event style experiment, this event takes a single parameter: UserStatusCreateEvent

Parameters
  • user (User) – The user that updated their status.

  • status (Status) – The new status.

  • expires_at (Optional[datetime.datetime]) – When the status will expire, if applicable.

guilded.on_user_status_delete(user, status)

A user deleted their status.

If you are using the event style experiment, this event takes a single parameter: UserStatusDeleteEvent

Parameters
  • user (User) – The user that deleted their status.

  • status (Status) – The status that was deleted.

guilded.on_channel_user_override_create(override)

A user override was created in a channel.

If you are using the event style experiment, this event takes a single parameter: ChannelUserOverrideCreateEvent

Parameters

override (ChannelUserOverride) – The override that was created.

guilded.on_raw_channel_user_override_update(override)

If the event style experiment is enabled, this event will never be dispatched.

A user override was updated.

Parameters

override (ChannelUserOverride) – The override after modification.

guilded.on_channel_user_override_update(event)

This event will only be dispatched if the event style experiment is enabled.

A user override was updated.

Parameters

event (ChannelUserOverrideUpdateEvent) – The event containing the payload.

guilded.on_channel_user_override_delete(override)

A user override was deleted.

If you are using the event style experiment, this event takes a single parameter: ChannelUserOverrideDeleteEvent

Parameters

override (ChannelUserOverride) – The override that was deleted.

guilded.on_category_user_override_create(override)

A user override was created in a category.

If you are using the event style experiment, this event takes a single parameter: CategoryUserOverrideCreateEvent

Parameters

override (CategoryUserOverride) – The override that was created.

guilded.on_raw_category_user_override_update(override)

If the event style experiment is enabled, this event will never be dispatched.

A user override was updated.

Parameters

override (CategoryUserOverride) – The override after modification.

guilded.on_category_user_override_update(event)

This event will only be dispatched if the event style experiment is enabled.

A user override was updated.

Parameters

event (CategoryUserOverrideUpdateEvent) – The event containing the payload.

guilded.on_category_user_override_delete(override)

A user override was deleted.

If you are using the event style experiment, this event takes a single parameter: CategoryUserOverrideDeleteEvent

Parameters

override (CategoryUserOverride) – The override that was deleted.

Event Wrappers

With the event style experiment enabled, many event handlers will receive one of the following subclasses. The basic structure of these event wrappers closely mirror the payloads provided by the Guilded API.

New in version 1.3.

class guilded.BaseEvent

Represents a Gateway event for dispatching to event handlers.

All events inherit from this class, and thus have the following attributes:

__gateway_event__

The Guilded event name that the event corresponds to.

Type

str

__dispatch_event__

The internal Pythonic event name to dispatch the event with. This is often, but not always, just a snake_case version of __gateway_event__ in present tense rather than past (e.g. resource_create vs. ResourceCreated).

Type

str

class guilded.MessageEvent

Represents a ChatMessageCreated event for dispatching to event handlers.

server_id

The ID of the server that the message was sent in.

Type

Optional[str]

server

The server that the message was sent in.

Type

Optional[Server]

message

The message that was sent.

Type

ChatMessage

class guilded.MessageUpdateEvent

Represents a ChatMessageUpdated event for dispatching to event handlers.

server_id

The ID of the server that the message was sent in.

Type

Optional[str]

server

The server that the message was sent in.

Type

Optional[Server]

before

The message before modification, if it was cached.

Type

Optional[ChatMessage]

after

The message after modification.

Type

ChatMessage

class guilded.MessageDeleteEvent

Represents a ChatMessageDeleted event for dispatching to event handlers.

server_id

The ID of the server that the message was sent in.

Type

Optional[str]

server

The server that the message was sent in.

Type

Optional[Server]

channel

The channel that the message was sent in.

Type

Optional[ServerChannel]

message

The message that was deleted.

Type

ChatMessage

message_id

The ID of the message that was deleted.

Deprecated since version 1.11: The library populates this value with data from message. Use that attribute instead.

Type

str

channel_id

The ID of the message’s channel.

Deprecated since version 1.11: The library populates this value with data from message. Use that attribute instead.

Type

str

deleted_at

When the message was deleted.

Deprecated since version 1.11: The library populates this value with data from message. Use that attribute instead.

Type

datetime.datetime

private

Whether the message was private.

Deprecated since version 1.11: The library populates this value with data from message. Use that attribute instead.

Type

bool

class guilded.BotAddEvent

Represents a BotServerMembershipCreated event for dispatching to event handlers.

New in version 1.5.

server_id

The ID of the server that the bot was added to.

Type

str

server

The server that the bot was added to.

Type

Server

member_id

The ID of the member that added the bot to the server.

Type

str

member

The member that added the bot to the server.

Type

Optional[Member]

class guilded.BotRemoveEvent

Represents a BotServerMembershipDeleted event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the bot was removed from.

Type

str

server

The server that the bot was removed from.

Type

Server

member_id

The ID of the member that removed the bot from the server.

Type

str

member

The member that removed the bot from the server.

Type

Optional[Member]

class guilded.MemberJoinEvent

Represents a ServerMemberJoined event for dispatching to event handlers.

server_id

The ID of the server that the member joined.

Type

str

server

The server that the member joined.

Type

Server

member

The member that joined.

Type

Member

user_member_count

The new number of non-bot members in the server. Imprecise if greater than 1000.

New in version 1.12.

Type

int

class guilded.MemberRemoveEvent

Represents a ServerMemberRemoved event for dispatching to event handlers.

server_id

The ID of the server that the member was removed from.

Type

str

server

The server that the member was removed from.

Type

Server

member

The member that was removed, from cache, if available.

Type

Optional[Member]

user_id

The ID of the member that was removed.

Type

str

kicked

Whether this removal was the result of a kick.

Type

bool

banned

Whether this removal was the result of a ban.

Type

bool

class guilded.BanCreateEvent

Represents a ServerMemberBanned event for dispatching to event handlers.

server_id

The ID of the server that the member was banned from.

Type

str

server

The server that the member was banned from.

Type

Server

ban

The ban entry that was created.

Type

MemberBan

member

The member that was banned, from cache, if available.

Type

Optional[Member]

class guilded.BanDeleteEvent

Represents a ServerMemberUnbanned event for dispatching to event handlers.

server_id

The ID of the server that the member was unbanned from.

Type

str

server

The server that the member was unbanned from.

Type

Server

ban

The ban entry that was deleted.

Type

MemberBan

member

The member that was unbanned, from cache, if available.

Type

Optional[Member]

class guilded.MemberUpdateEvent

Represents a ServerMemberUpdated event for dispatching to event handlers.

server_id

The ID of the server that the member is in.

Type

str

server

The server that the member is in.

Type

Server

before

The member before modification, if they were cached.

Type

Optional[Member]

after

The member after modification. If before is None, this will be a partial Member containing only the data that was modified and the ID of the user.

Type

Member

modified

A set of attributes that were modified for the member. This is useful if you need to know if a value was modified, but you do not care about what the previous value was.

Type

Set[str]

class guilded.BulkMemberRolesUpdateEvent

Represents a ServerRolesUpdated event for dispatching to event handlers.

This particular class only handles updates to role membership, not server roles.

server_id

The ID of the server that the members are in.

Type

str

server

The server that the members are in.

Type

Server

before

The members before their roles were updated, if they were cached. Not all members in after are guaranteed to be in before.

Type

List[Member]

after

The members after their roles were updated.

Type

List[Member]

class guilded.MemberSocialLinkCreateEvent

Represents a ServerMemberSocialLinkCreated event for dispatching to event handlers.

server_id

The ID of the server that the member is in.

Type

str

server

The server that the member is in.

Type

Server

The social link that was created.

Type

SocialLink

class guilded.MemberSocialLinkUpdateEvent

Represents a ServerMemberSocialLinkUpdated event for dispatching to event handlers.

server_id

The ID of the server that the member is in.

Type

str

server

The server that the member is in.

Type

Server

The social link after modification.

Type

SocialLink

class guilded.MemberSocialLinkDeleteEvent

Represents a ServerMemberSocialLinkDeleted event for dispatching to event handlers.

server_id

The ID of the server that the member is in.

Type

str

server

The server that the member is in.

Type

Server

The social link that was deleted.

Type

SocialLink

class guilded.BulkMemberXpAddEvent

Represents a ServerXpAdded event for dispatching to event handlers.

This event is usually the result of flowbot actions like those provided in XP Bot.

server_id

The ID of the server that the members are in.

Type

str

server

The server that the members are in.

Type

Server

user_ids

The IDs of the members that gained XP.

Type

List[str]

amount

The amount of XP that was added to each member.

Type

int

members

The updated members with their XP modified. If a member was not found in cache, this list will contain fewer items than user_ids.

Type

List[Member]

class guilded.ServerChannelCreateEvent

Represents a ServerChannelCreated event for dispatching to event handlers.

server_id

The ID of the server that the channel is in.

Type

str

server

The server that the channel is in.

Type

Server

channel

The channel that was created.

Type

abc.ServerChannel

class guilded.ServerChannelUpdateEvent

Represents a ServerChannelUpdated event for dispatching to event handlers.

server_id

The ID of the server that the channel is in.

Type

str

server

The server that the channel is in.

Type

Server

before

The channel before modification, if it was cached.

Type

Optional[abc.ServerChannel]

after

The channel after modification.

Deprecated since version 1.9: The channel alias.

Type

abc.ServerChannel

class guilded.ServerChannelDeleteEvent

Represents a ServerChannelDeleted event for dispatching to event handlers.

server_id

The ID of the server that the channel was in.

Type

str

server

The server that the channel was in.

Type

Server

channel

The channel that was deleted.

Type

abc.ServerChannel

class guilded.WebhookCreateEvent

Represents a ServerWebhookCreated event for dispatching to event handlers.

server_id

The ID of the server that the webhook is in.

Type

str

server

The server that the webhook is in.

Type

Server

webhook

The webhook that was created.

Type

Webhook

class guilded.WebhookUpdateEvent

Represents a ServerWebhookUpdated event for dispatching to event handlers.

server_id

The ID of the server that the webhook is in.

Type

str

server

The server that the webhook is in.

Type

Server

webhook

The webhook after modification. If Webhook.deleted_at is set, then this event indicates that the webhook was deleted.

Type

Webhook

class guilded.AnnouncementCreateEvent

Represents an AnnouncementCreated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the announcement is in.

Type

str

server

The server that the announcement is in.

Type

Server

channel

The channel that the announcement is in.

Type

AnnouncementChannel

announcement

The announcement that was created.

Type

Announcement

class guilded.AnnouncementUpdateEvent

Represents an AnnouncementUpdated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the announcement is in.

Type

str

server

The server that the announcement is in.

Type

Server

channel

The channel that the announcement is in.

Type

AnnouncementChannel

announcement

The announcement after modification.

Type

Announcement

class guilded.AnnouncementDeleteEvent

Represents an AnnouncementDeleted event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the announcement was in.

Type

str

server

The server that the announcement was in.

Type

Server

channel

The channel that the announcement was in.

Type

AnnouncementChannel

announcement

The announcement that was deleted.

Type

Announcement

class guilded.AnnouncementReactionAddEvent

Represents an AnnouncementReactionCreated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

AnnouncementChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

announcement_id

The ID of the announcement that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.AnnouncementReactionRemoveEvent

Represents an AnnouncementReactionDeleted event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

AnnouncementChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

announcement_id

The ID of the announcement that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.AnnouncementReplyCreateEvent

Represents an AnnouncementCommentCreated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

AnnouncementChannel

announcement

The announcement that the reply is under.

Type

Announcement

reply

The reply that was created.

Type

AnnouncementReply

class guilded.AnnouncementReplyUpdateEvent

Represents an AnnouncementCommentUpdated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

AnnouncementChannel

announcement

The announcement that the reply is under.

Type

Announcement

reply

The reply that was updated.

Type

AnnouncementReply

class guilded.AnnouncementReplyDeleteEvent

Represents an AnnouncementCommentDeleted event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reply was in.

Type

str

server

The server that the reply was in.

Type

Server

channel

The channel that the reply was in.

Type

AnnouncementChannel

announcement

The announcement that the reply was under.

Type

Announcement

reply

The reply that was deleted.

Type

AnnouncementReply

class guilded.AnnouncementReplyReactionAddEvent

Represents an AnnouncementCommentReactionCreated event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

AnnouncementChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

announcement_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.AnnouncementReplyReactionRemoveEvent

Represents an AnnouncementCommentReactionDeleted event for dispatching to event handlers.

New in version 1.8.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

AnnouncementChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

announcement_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.DocCreateEvent

Represents a DocCreated event for dispatching to event handlers.

server_id

The ID of the server that the doc is in.

Type

str

server

The server that the doc is in.

Type

Server

channel

The channel that the doc is in.

Type

DocsChannel

doc

The doc that was created.

Type

Doc

class guilded.DocUpdateEvent

Represents a DocUpdated event for dispatching to event handlers.

server_id

The ID of the server that the doc is in.

Type

str

server

The server that the doc is in.

Type

Server

channel

The channel that the doc is in.

Type

DocsChannel

doc

The doc after modification.

Type

Doc

class guilded.DocDeleteEvent

Represents a DocDeleted event for dispatching to event handlers.

server_id

The ID of the server that the doc was in.

Type

str

server

The server that the doc was in.

Type

Server

channel

The channel that the doc was in.

Type

DocsChannel

doc

The doc that was deleted.

Type

Doc

class guilded.DocReactionAddEvent

Represents a DocReactionCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

DocsChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

doc_id

The ID of the doc that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.DocReactionRemoveEvent

Represents a DocReactionDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

DocsChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

doc_id

The ID of the doc that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.DocReplyCreateEvent

Represents a DocCommentCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

DocsChannel

doc

The doc that the reply is under.

Type

Doc

reply

The reply that was created.

Type

DocReply

class guilded.DocReplyUpdateEvent

Represents a DocCommentUpdated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

DocsChannel

doc

The doc that the reply is under.

Type

Doc

reply

The reply that was updated.

Type

DocReply

class guilded.DocReplyDeleteEvent

Represents a DocCommentDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply was in.

Type

str

server

The server that the reply was in.

Type

Server

channel

The channel that the reply was in.

Type

DocsChannel

doc

The doc that the reply was under.

Type

Doc

reply

The reply that was deleted.

Type

DocReply

class guilded.DocReplyReactionAddEvent

Represents a DocCommentReactionCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

DocsChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

doc_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.DocReplyReactionRemoveEvent

Represents a DocCommentReactionDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

DocsChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

doc_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.CalendarEventCreateEvent

Represents a CalendarEventCreated event for dispatching to event handlers.

server_id

The ID of the server that the calendar event is in.

Type

str

server

The server that the calendar event is in.

Type

Server

channel

The channel that the calendar event is in.

Type

CalendarChannel

calendar_event

The calendar event that was created.

Type

CalendarEvent

class guilded.CalendarEventUpdateEvent

Represents a CalendarEventUpdated event for dispatching to event handlers.

server_id

The ID of the server that the calendar event is in.

Type

str

server

The server that the calendar event is in.

Type

Server

channel

The channel that the calendar event is in.

Type

CalendarChannel

calendar_event

The calendar event after modification.

Type

CalendarEvent

class guilded.CalendarEventDeleteEvent

Represents a CalendarEventDeleted event for dispatching to event handlers.

server_id

The ID of the server that the calendar event was in.

Type

str

server

The server that the calendar event was in.

Type

Server

channel

The channel that the calendar event was in.

Type

CalendarChannel

calendar_event

The calendar event that was deleted.

Type

CalendarEvent

class guilded.CalendarEventReactionAddEvent

Represents a CalendarEventReactionCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

CalendarChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

event_id

The ID of the calendar event that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.CalendarEventReactionRemoveEvent

Represents a CalendarEventReactionDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

CalendarChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

event_id

The ID of the calendar event that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.CalendarEventReplyCreateEvent

Represents a CalendarEventCommentCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

CalendarChannel

calendar_event

The event that the reply is under.

Type

CalendarEvent

reply

The reply that was created.

Type

CalendarEventReply

class guilded.CalendarEventReplyUpdateEvent

Represents a CalendarEventCommentUpdated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

CalendarChannel

calendar_event

The event that the reply is under.

Type

CalendarEvent

reply

The reply that was updated.

Type

CalendarEventReply

class guilded.CalendarEventReplyDeleteEvent

Represents a CalendarEventCommentDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reply was in.

Type

str

server

The server that the reply was in.

Type

Server

channel

The channel that the reply was in.

Type

CalendarChannel

calendar_event

The event that the reply was under.

Type

CalendarEvent

reply

The reply that was deleted.

Type

CalendarEventReply

class guilded.CalendarEventReplyReactionAddEvent

Represents a CalendarEventCommentReactionCreated event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

CalendarChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

event_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.CalendarEventReplyReactionRemoveEvent

Represents a CalendarEventCommentReactionDeleted event for dispatching to event handlers.

New in version 1.7.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

CalendarChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

event_id

The ID of the calendar event that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.CategoryCreateEvent

Represents a CategoryCreated event for dispatching to event handlers.

New in version 1.11.

server_id

The ID of the server that the category is in.

Type

str

server

The server that the category is in.

Type

Server

category

The category that was created.

Type

Category

class guilded.CategoryUpdateEvent

Represents a CategoryUpdated event for dispatching to event handlers.

New in version 1.11.

server_id

The ID of the server that the category is in.

Type

str

server

The server that the category is in.

Type

Server

before

The category before modification, if it was cached.

Type

Optional[Category]

after

The category after modification.

Type

Category

class guilded.CategoryDeleteEvent

Represents a CategoryDeleted event for dispatching to event handlers.

New in version 1.11.

server_id

The ID of the server that the category was in.

Type

str

server

The server that the category was in.

Type

Server

category

The category that was deleted.

Type

Category

class guilded.RsvpUpdateEvent

Represents a CalendarEventRsvpUpdated event for dispatching to event handlers.

server_id

The ID of the server that the RSVP is in.

Type

str

server

The server that the RSVP is in.

Type

Server

channel

The channel that the RSVP is in.

Type

CalendarChannel

rsvp

The RSVP that was created or updated.

Type

CalendarEventRsvp

class guilded.RsvpDeleteEvent

Represents a CalendarEventRsvpDeleted event for dispatching to event handlers.

server_id

The ID of the server that the RSVP was in.

Type

str

server

The server that the RSVP was in.

Type

Server

channel

The channel that the RSVP was in.

Type

CalendarChannel

rsvp

The RSVP that was deleted.

Type

CalendarEventRsvp

class guilded.BulkRsvpCreateEvent

Represents a CalendarEventRsvpManyUpdated event for dispatching to event handlers.

server_id

The ID of the server that the RSVPs are in.

Type

str

server

The server that the RSVPs are in.

Type

Server

channel

The channel that the RSVPs are in.

Type

CalendarChannel

rsvps

The RSVPs that were created.

Type

List[CalendarEventRsvp]

class guilded.ForumTopicCreateEvent

Represents a ForumTopicCreated event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic that was created.

Type

ForumTopic

class guilded.ForumTopicUpdateEvent

Represents a ForumTopicUpdated event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic after modification.

Type

ForumTopic

class guilded.ForumTopicDeleteEvent

Represents a ForumTopicDeleted event for dispatching to event handlers.

server_id

The ID of the server that the forum topic was in.

Type

str

server

The server that the forum topic was in.

Type

Server

channel

The channel that the forum topic was in.

Type

ForumChannel

topic

The forum topic that was deleted.

Type

ForumTopic

class guilded.ForumTopicPinEvent

Represents a ForumTopicPinned event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic that was pinned.

Type

ForumTopic

class guilded.ForumTopicUnpinEvent

Represents a ForumTopicUnpinned event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic that was unpinned.

Type

ForumTopic

class guilded.ForumTopicLockEvent

Represents a ForumTopicLocked event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic that was locked.

Type

ForumTopic

class guilded.ForumTopicUnlockEvent

Represents a ForumTopicUnlocked event for dispatching to event handlers.

server_id

The ID of the server that the forum topic is in.

Type

str

server

The server that the forum topic is in.

Type

Server

channel

The channel that the forum topic is in.

Type

ForumChannel

topic

The forum topic that was unlocked.

Type

ForumTopic

class guilded.ForumTopicReactionAddEvent

Represents a ForumTopicReactionCreated event for dispatching to event handlers.

New in version 1.5.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

ForumChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

topic_id

The ID of the forum topic that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.ForumTopicReactionRemoveEvent

Represents a ForumTopicReactionDeleted event for dispatching to event handlers.

New in version 1.5.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

ForumChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

topic_id

The ID of the forum topic that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.ForumTopicReplyCreateEvent

Represents a ForumTopicCommentCreated event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

ForumChannel

topic

The topic that the reply is under.

Type

ForumTopic

reply

The reply that was created.

Type

ForumTopicReply

class guilded.ForumTopicReplyUpdateEvent

Represents a ForumTopicCommentUpdated event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the reply is in.

Type

str

server

The server that the reply is in.

Type

Server

channel

The channel that the reply is in.

Type

ForumChannel

topic

The topic that the reply is under.

Type

ForumTopic

reply

The reply that was updated.

Type

ForumTopicReply

class guilded.ForumTopicReplyDeleteEvent

Represents a ForumTopicCommentDeleted event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the reply was in.

Type

str

server

The server that the reply was in.

Type

Server

channel

The channel that the reply was in.

Type

ForumChannel

topic

The topic that the reply was under.

Type

ForumTopic

reply

The reply that was deleted.

Type

ForumTopicReply

class guilded.ForumTopicReplyReactionAddEvent

Represents a ForumTopicCommentReactionCreated event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

ForumChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

topic_id

The ID of the forum topic that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.ForumTopicReplyReactionRemoveEvent

Represents a ForumTopicCommentReactionDeleted event for dispatching to event handlers.

New in version 1.6.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

ForumChannel

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

topic_id

The ID of the forum topic that the reply is under.

Type

int

reply_id

The ID of the reply that the reaction is on.

Type

int

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.GroupCreateEvent

Represents a GroupCreated event for dispatching to event handlers.

server_id

The ID of the server that the group is in.

Type

str

server

The server that the group is in.

Type

Server

group

The group that was created.

Type

Group

class guilded.GroupUpdateEvent

Represents a GroupUpdated event for dispatching to event handlers.

server_id

The ID of the server that the group is in.

Type

str

server

The server that the group is in.

Type

Server

group

The group after modification.

Type

Group

class guilded.GroupDeleteEvent

Represents a GroupDeleted event for dispatching to event handlers.

server_id

The ID of the server that the group was in.

Type

str

server

The server that the group was in.

Type

Server

group

The group that was deleted.

Type

Group

class guilded.ListItemCreateEvent

Represents a ListItemCreated event for dispatching to event handlers.

server_id

The ID of the server that the list item is in.

Type

str

server

The server that the list item is in.

Type

Server

channel

The channel that the list item is in.

Type

ListChannel

item

The list item that was created.

Type

ListItem

class guilded.ListItemUpdateEvent

Represents a ListItemUpdated event for dispatching to event handlers.

server_id

The ID of the server that the list item is in.

Type

str

server

The server that the list item is in.

Type

Server

channel

The channel that the list item is in.

Type

ListChannel

item

The list item after modification.

Type

ListItem

class guilded.ListItemDeleteEvent

Represents a ListItemDeleted event for dispatching to event handlers.

server_id

The ID of the server that the list item was in.

Type

str

server

The server that the list item was in.

Type

Server

channel

The channel that the list item was in.

Type

ListChannel

item

The list item that was deleted.

Type

ListItem

class guilded.ListItemCompleteEvent

Represents a ListItemCompleted event for dispatching to event handlers.

server_id

The ID of the server that the list item is in.

Type

str

server

The server that the list item is in.

Type

Server

channel

The channel that the list item is in.

Type

ListChannel

item

The list item that was completed.

Type

ListItem

class guilded.ListItemUncompleteEvent

Represents a ListItemUncompleted event for dispatching to event handlers.

server_id

The ID of the server that the list item is in.

Type

str

server

The server that the list item is in.

Type

Server

channel

The channel that the list item is in.

Type

ListChannel

item

The list item that was uncompleted.

Type

ListItem

class guilded.MessageReactionAddEvent

Represents a ChannelMessageReactionCreated event for dispatching to event handlers.

server_id

The ID of the server that the reaction is in.

Type

str

server

The server that the reaction is in.

Type

Server

channel

The channel that the reaction is in.

Type

Union[ChatChannel, VoiceChannel, Thread, DMChannel]

message

The message that the reaction is on, if it is cached.

Type

Optional[ChatMessage]

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction is in.

Type

str

message_id

The ID of the message that the reaction is on.

Type

str

user_id

The ID of the user that added the reaction.

Type

str

emote

The emote that the reaction shows.

Type

Emote

class guilded.MessageReactionRemoveEvent

Represents a ChannelMessageReactionDeleted event for dispatching to event handlers.

server_id

The ID of the server that the reaction was in.

Type

str

server

The server that the reaction was in.

Type

Server

channel

The channel that the reaction was in.

Type

Union[ChatChannel, VoiceChannel, Thread, DMChannel]

message

The message that the reaction was on, if it is cached.

Type

Optional[ChatMessage]

member

The member that added the reaction, if they are cached.

Type

Optional[Member]

deleted_by

The member that removed the reaction, if they are cached.

Type

Optional[Member]

channel_id

The ID of the channel that the reaction was in.

Type

str

message_id

The ID of the message that the reaction was on.

Type

str

user_id

The ID of the user that added the reaction.

Type

str

deleted_by_id

The ID of the user that removed the reaction.

Type

str

emote

The emote that the reaction showed.

Type

Emote

class guilded.BulkMessageReactionRemoveEvent

Represents a ChannelMessageReactionManyDeleted event for dispatching to event handlers.

server_id

The ID of the server that the reactions were in.

Type

str

server

The server that the reactions were in.

Type

Server

channel

The channel that the reactions were in.

Type

Union[ChatChannel, VoiceChannel, Thread, DMChannel]

message

The message that the reactions were on, if it is cached.

Type

Optional[ChatMessage]

channel_id

The ID of the channel that the reactions were in.

Type

str

message_id

The ID of the message that the reactions were on.

Type

str

user_id

The ID of the user that added the reaction.

Type

str

deleted_by_id

The ID of the user that removed the reactions.

Type

str

deleted_by

The member that removed the reactions, if they are cached.

Type

Optional[Member]

count

The number of reactions that were removed.

Type

int

emote

The emote that the reactions showed, if applicable.

Type

Optional[Emote]

class guilded.RoleCreateEvent

Represents a RoleCreated event for dispatching to event handlers.

server_id

The ID of the server that the role is in.

Type

str

server

The server that the role is in.

Type

Server

role

The role that was created.

Type

Role

class guilded.RoleUpdateEvent

Represents a RoleUpdated event for dispatching to event handlers.

server_id

The ID of the server that the role is in.

Type

str

server

The server that the role is in.

Type

Server

before

The role before modification, if it was cached.

Type

Optional[Role]

after

The role after modification.

Type

Role

class guilded.RoleDeleteEvent

Represents a RoleDeleted event for dispatching to event handlers.

server_id

The ID of the server that the role was in.

Type

str

server

The server that the role was in.

Type

Server

role

The role that was deleted.

Type

Role

class guilded.ChannelRoleOverrideCreateEvent

Represents a ChannelRolePermissionCreated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The role override that was created.

Type

ChannelRoleOverride

class guilded.ChannelRoleOverrideUpdateEvent

Represents a ChannelRolePermissionUpdated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The role override after modification.

Type

ChannelRoleOverride

class guilded.ChannelRoleOverrideDeleteEvent

Represents a ChannelRolePermissionDeleted event for dispatching to event handlers.

server_id

The ID of the server that the override was in.

Type

str

server

The server that the override was in.

Type

Server

override

The role override that was deleted.

Type

ChannelRoleOverride

class guilded.ChannelUserOverrideCreateEvent

Represents a ChannelUserPermissionCreated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The user override that was created.

Type

ChannelUserOverride

class guilded.ChannelUserOverrideUpdateEvent

Represents a ChannelUserPermissionUpdated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The user override after modification.

Type

ChannelUserOverride

class guilded.ChannelUserOverrideDeleteEvent

Represents a ChannelUserPermissionDeleted event for dispatching to event handlers.

server_id

The ID of the server that the override was in.

Type

str

server

The server that the override was in.

Type

Server

override

The user override that was deleted.

Type

ChannelUserOverride

class guilded.CategoryRoleOverrideCreateEvent

Represents a ChannelCategoryRolePermissionCreated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The role override that was created.

Type

CategoryRoleOverride

class guilded.CategoryRoleOverrideUpdateEvent

Represents a ChannelCategoryRolePermissionUpdated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The role override after modification.

Type

CategoryRoleOverride

class guilded.CategoryRoleOverrideDeleteEvent

Represents a ChannelCategoryRolePermissionDeleted event for dispatching to event handlers.

server_id

The ID of the server that the override was in.

Type

str

server

The server that the override was in.

Type

Server

override

The role override that was deleted.

Type

CategoryRoleOverride

class guilded.CategoryUserOverrideCreateEvent

Represents a ChannelCategoryUserPermissionCreated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The user override that was created.

Type

CategoryUserOverride

class guilded.CategoryUserOverrideUpdateEvent

Represents a ChannelCategoryUserPermissionUpdated event for dispatching to event handlers.

server_id

The ID of the server that the override is in.

Type

str

server

The server that the override is in.

Type

Server

override

The user override after modification.

Type

CategoryUserOverride

class guilded.CategoryUserOverrideDeleteEvent

Represents a ChannelCategoryUserPermissionDeleted event for dispatching to event handlers.

server_id

The ID of the server that the override was in.

Type

str

server

The server that the override was in.

Type

Server

override

The user override that was deleted.

Type

CategoryUserOverride

class guilded.UserStatusCreateEvent

Represents a UserStatusCreated event for dispatching to event handlers.

user_id

The ID of the user that updated their status.

Type

str

user

The user that updated their status.

Type

Optional[User]

status

The new status.

Type

Status

expires_at

When the status will expire, if applicable.

Type

Optional[datetime.datetime]

class guilded.UserStatusDeleteEvent

Represents a UserStatusDeleted event for dispatching to event handlers.

user_id

The ID of the user that deleted their status.

Type

str

user

The user that deleted their status.

Type

Optional[User]

status

The status that was deleted.

Type

Status

Enumerations

The API provides some enumerations for certain types of strings to avoid the API from being stringly typed in case the strings change in the future.

class guilded.MediaType

Represents a file/attachment’s media type in Guilded.

attachment

the media is an Attachment.

content_media

the media is an Attachment.

emoji

the media is an emoji.

custom_reaction

the media is an emoji.

avatar

the media is a User or Member avatar.

user_avatar

the media is a User or Member avatar.

profile_avatar

the media is a User or Member avatar.

banner

the media is a User or Member banner.

user_banner

the media is a User or Member banner.

profile_banner

the media is a User or Member banner.

server_icon

the media is a Server avatar.

team_avatar

the media is a Server avatar.

team_banner

the media is a Server banner.

group_icon

the media is a Group avatar.

group_avatar

the media is a Group avatar.

group_banner

the media is a Group banner.

embed_image

the media is a proxied image in a link embed.

class guilded.FileType

Represents a type of file in Guilded. In the case of uploading files, this usually does not have to be set manually, but if the library fails to detect the type of file from its extension, you can pass this into File's file_type parameter.

image

the file is an image

video

the file is a video

class guilded.ChannelType

A type of channel.

announcements

the channel is an announcement channel.

calendar

the channel is a calendar channel.

chat

the channel is a chat or “text” channel.

docs

the channel is a docs channel.

forums

the channel is a forums channel.

media

the channel is a media channel.

news

the channel is an announcement channel. this is an alias of announcements.

list

the channel is a list channel.

scheduling

the channel is a scheduling channel.

stream

the channel is a stream channel.

text

the channel is a chat or “text” channel. this is an alias of chat.

voice

the channel is a voice channel.

class guilded.ChannelVisibility

Restricts what users can view a channel.

public

Visible to everyone, including members who are not part of the server. Threads cannot be public.

private

Visible only to members who have been explicitly mentioned. Non-thread channels cannot be private.

class guilded.FlowTriggerType

A type of flow trigger for FlowBots.

server_updated

Server settings on the overview page changed

member_muted

A member is muted on the server

member_sent_message_to_channel

When someone sends a message to a channel

member_joined

Via an application, an invite, or any other means

application_received

When a user applies to the server

toggle_list_item

When a ListItem is marked as complete or incomplete

event_created

An event is created in a calendar channel

event_updated

An event is updated in a calendar channel

event_removed

An event is deleted in a calendar channel

forum_topic_created

A topic is created in a ForumChannel

forum_topic_updated

A topic is updated in a ForumChannel

forum_topic_deleted

A topic is deleted in a ForumChannel

list_item_created

A list item’s content is created in a ListChannel

list_item_updated

A list item’s content is updated in a ListChannel

list_item_deleted

A list item’s content is deleted in a ListChannel

doc_created

A doc is created in a DocsChannel

doc_updated

A doc is updated in a DocsChannel

doc_deleted

A doc is deleted in a DocsChannel

media_created

Media is created in a MediaChannel

media_updated

Media is updated in a MediaChannel

media_deleted

Media is deleted in a MediaChannel

announcement_created

An announcement is created in an AnnouncementChannel

announcement_updated

An announcement is updated in an AnnouncementChannel

announcement_deleted

An announcement is deleted in an AnnouncementChannel

voice_group_joined

A voice group is joined in a VoiceChannel

voice_group_left

A voice group is left in a VoiceChannel

twitch_stream_online

A Twitch stream has started

twitch_stream_offline

A Twitch stream has stopped

twitch_stream_subscribed

A user has subscribed to a Twitch stream

twitch_stream_followed

A user has followed a Twitch stream

twitch_stream_unfollowed

A user has unfollowed a Twitch stream

twitch_stream_unsubscribed

A user has unsubscribed to a Twitch stream

patreon_tiered_membership_created

A user has pledged to a campaign’s tier

patreon_tiered_membership_updated

A user has updated their pledged tier in a campaign

patreon_tiered_membership_cancelled

A user has cancelled their pledge to a campaign’s tier

subscription_created

A member subscribes to the server

subscription_updated

A member upgrades or downgrades their server subscription

subscription_canceled

A member cancels their server subscription

scheduling_availability_started

Availability started in a scheduling channel

scheduling_availability_ended

Availability ended in a scheduling channel

Missing youtube_video_published

New video posted from specified channel

class guilded.FlowActionType

An action to perform when a FlowTriggerType is activated.

send_a_custom_message

Send a custom message

assign_role

Assign a role

add_xp_to_member

Add XP to a member

edit_group_membership

Edit group membership

create_a_forum_topic

Create a forum topic

create_a_list_item

Create a list item

remove_role

Remove a role

delete_a_message

Delete a message

create_a_doc

Create a doc

class guilded.Presence

Represents a User's presence - the colored circle on their avatar in the client.

online

the user is online

idle

the user is idle

dnd

the user is on “do not disturb” mode

do_not_disturb

the user is on “do not disturb” mode

invisible

the user is offline or invisible

offline

the user is offline or invisible

class guilded.ServerType

A type of server.

team

The server’s type is “Team”.

organization

The server’s type is “Organization”.

community

The server’s type is “Community”.

clan

The server’s type is “Clan”.

guild

The server’s type is “Guild”.

friends

The server’s type is “Friends”.

streaming

The server’s type is “Streaming”.

other

The server’s type is “Other”.

class guilded.SocialLinkType

A type of social link.

New in version 1.3.

twitch

The social link is a Twitch connection.

bnet

The social link is a Battle.net connection.

battlenet

The social link is a Battle.net connection. This is an alias of bnet.

psn

The social link is a Playstation Network connection.

playstation

The social link is a Playstation Network connection. This is an alias of psn.

xbox

The social link is an Xbox connection.

steam

The social link is a Steam connection.

origin

The social link is an Origin connection.

youtube

The social link is a YouTube connection.

twitter

The social link is a Twitter connection.

facebook

The social link is a Facebook connection.

switch

The social link is a Nintendo Switch connection.

patreon

The social link is a Patreon connection.

roblox

The social link is a Roblox connection.

epic

The social link is an Epic Games connection.

epicgames

The social link is an Epic Games connection. This is an alias of epic.

class guilded.RepeatInterval

A basic repeat interval setting for calendar events.

New in version 1.7.

once

The event will repeat once.

daily

The event will repeat every day.

weekly

The event will repeat every week.

monthly

The event will repeat every month.

custom

A custom repeat interval. When constructing a RepeatInfo, use CustomRepeatInterval instead of this enum value.

class guilded.CustomRepeatInterval

A custom repeat interval setting for calendar events. These intervals allow for more advanced repeat info.

New in version 1.7.

daily

The event will repeat every day.

weekly

The event will repeat every week.

monthly

The event will repeat every month.

yearly

The event will repeat every year.

There is an alias for this attribute called annually.

annually

The event will repeat every year.

There is an alias for this attribute called yearly.

class guilded.Weekday

A day of the week for RepeatInfo with the CustomRepeatInterval.weekly interval.

New in version 1.7.

sunday

The event will repeat every Sunday.

monday

The event will repeat every Monday.

tuesday

The event will repeat every Tuesday.

wednesday

The event will repeat every Wednesday.

thursday

The event will repeat every Thursday.

friday

The event will repeat every Friday.

saturday

The event will repeat every Saturday.

class guilded.DeleteSeriesType

Controls deletion behavior of calendar events in a series.

New in version 1.7.

all

All events in the series will be deleted.

forward

Only the event and future items in its series will be deleted.

class guilded.ServerSubscriptionTierType

A type of server subscription tier.

New in version 1.9.

gold

The tier type is “Gold”.

silver

The tier type is “Silver”.

copper

The tier type is “Copper”.

Utility Functions

A helper function to make links clickable when sent into chat.

Returns a markdown “named link”, e.g. [Guilded](https://guilded.gg).

Alias of hyperlink().

guilded.utils.new_uuid()

Generate a new, Guilded-compliant UUID.

await guilded.utils.sleep_until(when, result=None)

This function is a coroutine.

Sleep until a specified time.

Parameters
  • when (datetime.datetime) – The datetime to sleep until.

  • result (Any) – Returned when the function finishes, if provided.

guilded.utils.find(predicate, sequence)

Iterate through sequence to find a matching object for predicate.

If nothing is found, None is returned.

Parameters
  • predicate (Callable) – A function that returns a boolean or boolean-like result.

  • sequence – An iterable to search through.

guilded.utils.get(sequence, **attributes)

Return an object from sequence that matches the attributes.

If nothing is found, None is returned.

Parameters
  • sequence – An iterable to search through.

  • **attrs – Keyword arguments representing attributes of each item to match with.

guilded.utils.remove_markdown(text, *, ignore_links=True)

A helper function that removes markdown characters.

Note

This function is not markdown aware and may remove meaning from the original text. For example, if the input contains 10 * 5 then it will be converted into 10  5.

Parameters
  • text (str) – The text to remove markdown from.

  • ignore_links (bool) – Whether to leave links alone when removing markdown. For example, if a URL in the text contains characters such as _ then it will be left alone. Defaults to True.

Returns

The text with the markdown special characters removed.

Return type

str

guilded.utils.escape_markdown(text, *, as_needed=False, ignore_links=True)

A helper function that escapes markdown.

Parameters
  • text (str) – The text to escape markdown from.

  • as_needed (bool) – Whether to escape the markdown characters as needed. This means that it does not escape extraneous characters if it’s not necessary, e.g. **hello** is escaped into \*\*hello** instead of \*\*hello\*\*. Note however that this can open you up to some clever syntax abuse. Defaults to False.

  • ignore_links (bool) – Whether to leave links alone when escaping markdown. For example, if a URL in the text contains characters such as _ then it will be left alone. This option is not supported with as_needed. Defaults to True.

Returns

The text with the markdown special characters escaped with a slash.

Return type

str

guilded.utils.escape_mentions(text)

A helper function that escapes everyone, here, role, and user mentions.

Note

This does not include channel mentions.

Parameters

text (str) – The text to escape mentions from.

Returns

The text with the mentions removed.

Return type

str

Webhooks

Webhooks are a convenient way to send messages to channels without any user or bot authentication.

Webhook

class guilded.Webhook

Represents an asynchronous webhook.

There are two main ways to use Webhooks. The first is through the ones received by the library such as Server.webhooks() and ChatChannel.webhooks(). The ones received by the library will automatically be bound using the library’s internal HTTP session.

The second form involves creating a webhook object manually using the from_url() or partial() classmethods.

For example, creating a webhook from a URL and using aiohttp:

from guilded import Webhook
import aiohttp

async def foo():
    async with aiohttp.ClientSession() as session:
        webhook = Webhook.from_url('url-here', session=session)
        await webhook.send('Hello World')
x == y

Checks if two webhooks are equal.

x != y

Checks if two webhooks are not equal.

id

The webhook’s ID

Type

str

token

The authentication token of the webhook. If this is None then the webhook cannot be used to send messages.

Type

Optional[str]

server_id

The server ID this webhook is for.

Type

Optional[str]

channel_id

The channel ID this webhook is for.

Type

Optional[str]

name

The webhook’s name.

Type

Optional[str]

created_at

When the webhook was created.

Type

datetime.datetime

deleted_at

When the webhook was deleted.

Type

Optional[datetime.datetime]

property url

Returns the webhook’s URL.

Type

str

classmethod partial(id, token, *, session, auth_token=None)

Creates a partial Webhook.

Parameters
  • id (str) – The ID of the webhook.

  • token (str) – The authentication token of the webhook.

  • session (aiohttp.ClientSession) – The session to use to send requests with. Note that the library does not manage the session and will not close it.

  • auth_token (Optional[str]) – The bot authentication token for authenticated requests involving the webhook.

Returns

A partial Webhook. A partial webhook is a webhook object with only an ID and a token.

Return type

Webhook

classmethod from_url(url, *, session, auth_token=None)

Creates a partial Webhook from a webhook URL.

Parameters
  • url (str) – The URL of the webhook.

  • session (aiohttp.ClientSession) – The session to use to send requests with. Note that the library does not manage the session and will not close it.

  • auth_token (Optional[str]) – The bot authentication token for authenticated requests involving the webhook. This is required to fetch and delete messages and the webhook itself.

Returns

A partial Webhook. A partial webhook is a webhook object with only an ID and a token.

Return type

Webhook

Raises

ValueError – The URL is invalid.

await fetch(*, server=None)

This function is a coroutine.

Fetches the current webhook.

This could be used to get a full webhook from a partial webhook.

This requires an authenticated webhook.

Parameters

server (Optional[Server]) – The server that the webhook exists in. This is only required if server_id is None.

Returns

The fetched webhook.

Return type

Webhook

Raises
  • HTTPException – Could not fetch the webhook.

  • NotFound – Could not find the webhook by this ID.

  • ValueError – This instance of a webhook does not have authentication info associated with it or no server was provided but it is required.

await delete(*, server=None)

This function is a coroutine.

Deletes this webhook.

This requires an authenticated webhook.

Parameters

server (Optional[Server]) – The server that the webhook exists in. This is only required if server_id is None.

Raises
  • HTTPException – Deleting the webhook failed.

  • NotFound – This webhook does not exist.

  • Forbidden – You do not have permissions to delete this webhook.

  • ValueError – This instance of a webhook does not have authentication info associated with it or no server was provided but it is required.

await edit(*, name=..., channel=None, server=None)

This function is a coroutine.

Edits this webhook.

This requires an authenticated webhook.

Parameters
  • name (Optional[str]) – The webhook’s new name.

  • channel (Union[ChatChannel, ListChannel]) – The channel to move the webhook to.

  • server (Optional[Server]) – The server that the webhook exists in. This is only required if server_id is None.

Returns

The updated webhook.

Return type

Webhook

Raises
  • HTTPException – Editing the webhook failed.

  • NotFound – This webhook does not exist.

  • ValueError – This instance of a webhook does not have authentication info associated with it or no server was provided but it is required.

await move(to)

This function is a coroutine.

Moves this webhook to another channel.

Parameters

to (Union[ChatChannel, ListChannel]) – The channel to move the webhook to.

Returns

The updated webhook.

Return type

Webhook

Raises
  • HTTPException – Editing the webhook failed.

  • NotFound – This webhook does not exist.

  • ValueError – This instance of a webhook does not have authentication info associated with it.

await send(content=..., *, username=..., avatar_url=..., embed=..., embeds=..., file=..., files=...)

This function is a coroutine.

Sends a message or create a list item using this webhook.

Warning

If this webhook is in a ListChannel, this method will return a ListItem instead of a WebhookMessage.

The content must be a type that can convert to a string through str(content).

To upload a single file, the file parameter should be used with a single File object.

If the embed parameter is provided, it must be of type Embed and it must be a rich embed type. You cannot mix the embed parameter with the embeds parameter, which must be a list of Embed objects to send.

Parameters
  • content (str) – The content of the message to send, or the message of the list item to create.

  • username (str) –

    A custom username to use with this message instead of the webhook’s own username.

    New in version 1.4.

  • avatar_url (str) –

    A custom avatar URL to use with this message instead of the webhook’s own avatar. This is explicitly cast to str if it is not already.

    New in version 1.4.

  • file (File) – The file to upload. This cannot be mixed with files parameter.

  • files (List[File]) – A list of files to send. This cannot be mixed with the file parameter.

  • embed (Embed) – The rich embed for the content to send. This cannot be mixed with embeds parameter.

  • embeds (List[Embed]) – A list of embeds to send. Maximum of 10. This cannot be mixed with the embed parameter.

Returns

If this webhook is in a ChatChannel, the WebhookMessage that was sent. Otherwise, the ListItem that was created.

Return type

Union[WebhookMessage, ListItem]

Raises
  • HTTPException – Executing the webhook failed.

  • NotFound – This webhook was not found.

  • Forbidden – The token for the webhook is incorrect.

  • TypeError – You specified both embed and embeds or file and files.

  • ValueError – The length of embeds was invalid or there was no token associated with this webhook.

property avatar

Returns an Asset for the avatar the webhook has.

If the webhook does not have an uploaded avatar, None is returned. If you want the avatar that the webhook displays, consider display_avatar instead.

Type

Optional[Asset]

property channel

The channel this webhook belongs to.

If this is a partial webhook, then this will always return None.

Type

Optional[Union[ChatChannel, ListChannel]]

property default_avatar

Returns the default avatar. This is always ‘Gil’.

Type

Asset

property display_avatar

Returns the webhook’s display avatar.

This is either webhook’s default avatar or uploaded avatar.

Type

Asset

await fetch_message(message_id, /, *, channel=None)

This function is a coroutine.

Retrieves a single WebhookMessage sent by this webhook.

This requires an authenticated webhook.

Parameters
  • id (str) – The message ID to look for.

  • channel (Optional[ChatChannel]) – The channel that this message exists in. This is only required if channel_id is None.

Returns

The message that was asked for.

Return type

WebhookMessage

Raises
  • NotFound – The specified message was not found.

  • Forbidden – You do not have the permissions required to get a message.

  • HTTPException – Retrieving the message failed.

  • ValueError – This instance of a webhook does not have authentication info associated with it or no channel was provided but it is required.

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

Type

Optional[Server]

is_authenticated()

bool: Whether the webhook has non-webhook authentication information associated with it.

If this is not True, you will not be able to manage messages sent by this webhook, nor delete or edit the webhook itself.

is_partial()

bool: Whether the webhook is a “partial” webhook.

property server

The server this webhook belongs to.

If this is a partial webhook, then this will always return None.

Type

Optional[Server]

await delete_message(message_id, /, *, channel=None)

This function is a coroutine.

Deletes a message sent by this webhook.

This is a lower level interface to WebhookMessage.delete() in case you only have an ID.

This requires an authenticated webhook.

Parameters
  • message_id (str) – The message ID to delete.

  • channel (Optional[ChatChannel]) – The channel that this message exists in. This is only required if channel_id is None.

Raises
  • HTTPException – Deleting the message failed.

  • Forbidden – Deleted a message that is not yours.

  • ValueError – This instance of a webhook does not have authentication info associated with it or no channel was provided but it is required.

WebhookMessage

class guilded.WebhookMessage

Represents a message sent from your webhook.

This allows you to delete a message sent by your webhook, although the parent webhook requires authentication information.

This inherits from ChatMessage with changes to delete() to work.

await edit(*args, **kwargs)

This function is a coroutine.

Edit this message.

Warning

This method overwrites all content previously in the message using the new payload.

Parameters
  • content (str) – The text content of the message.

  • embed (Embed) – An embed in the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds in the message. At present, this can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

Returns

The edited message.

Return type

ChatMessage

Raises
  • NotFound – The message does not exist.

  • Forbidden – The message is not owned by you or it is in a channel you cannot access.

  • HTTPException – Could not edit the message.

await delete(*, delay=None)

This function is a coroutine.

Deletes the message.

Parameters

delay (Optional[float]) – If provided, the number of seconds to wait before deleting the message. The waiting is done in the background and deletion failures are ignored.

Raises
  • Forbidden – You do not have proper permissions to delete the message.

  • NotFound – The message was deleted already.

  • HTTPException – Deleting the message failed.

  • ValueError – This instance of a webhook does not have authentication info associated with it.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this message.

Parameters

emote (Emote) – The emote to add.

property author

The user that created this message, if they are cached.

Type

Optional[Union[Member, User]]

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

await clear_reaction(emote, /)

This function is a coroutine.

Bulk remove reactions from this message based on their emote.

To remove individual reactions from specific users, see remove_reaction().

New in version 1.9.

Parameters

emote (Emote) – The emote to remove.

await clear_reactions()

This function is a coroutine.

Bulk remove all the reactions from this message.

New in version 1.9.

await create_thread(name, *, visibility=None)

This function is a coroutine.

Create a new thread under the message.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

property created_by_bot

Whether this message’s author is a bot or webhook.

Type

bool

property group

The group that the message is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server this message was sent in.

Type

Optional[Server]

property jump_url

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of share_url.

The share URL of the message.

Type

str

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

await pin()

This function is a coroutine.

Pin this message.

New in version 1.10.

Raises
  • NotFound – The channel or message does not exist.

  • Forbidden – You are not allowed to pin messages in this channel.

  • HTTPException – Failed to pin the message.

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

await remove_reaction(emote, member=None)

This function is a coroutine.

Remove a reaction from this message.

If the reaction is not your own then manage_messages is required.

New in version 1.9.

Parameters
  • emote (Emote) – The emote to remove.

  • member (Optional[User]) – The member whose reaction to remove. If this is not specified, the client’s reaction will be removed instead.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this message.

Deprecated since version 1.9: Use remove_reaction() instead.

Parameters

emote (Emote) – The emote to remove.

property replied_to

The list of messages that the message replied to.

This property relies on message cache. If you need a list of IDs, consider replied_to_ids instead.

Type

List[ChatMessage]

await reply(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None)

This function is a coroutine.

Reply to this message. This is identical to abc.Messageable.send(), but the reply_to parameter already includes this message.

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property server

The server this message was sent in.

Type

Optional[Server]

property share_url

The share URL of the message.

Type

str

await unpin()

This function is a coroutine.

Unpin this message.

New in version 1.10.

Raises
  • NotFound – The channel or message does not exist.

  • Forbidden – You are not allowed to unpin messages in this channel.

  • HTTPException – Failed to unpin the message.

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

Abtract Base Classes

Abtract base classes are classes that some models inherit from in order to get their behaviour. They are not to be user-instantiated.

Messageable

class guilded.abc.Messageable

An ABC for models that messages can be sent to.

The following implement this ABC:

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

User

class guilded.abc.User

An ABC for user-type models.

The following implement this ABC:

id

The user’s id.

Type

str

name

The user’s name.

Type

str

bot_id

The user’s corresponding bot ID, if any. This will likely only be available for the connected ClientUser.

Type

Optional[str]

avatar

The user’s set avatar, if any.

Type

Optional[Asset]

banner

The user’s profile banner, if any.

Type

Optional[Asset]

created_at

When the user’s account was created. This may be None if the user object was partial.

Type

Optional[datetime.datetime]

status

The custom status set by the user.

Type

Optional[Status]

property mention

The mention string for this user.

This will render and deliver a mention when sent in an Embed.

Type

str

property bot

This exists for compatibility with discord.py bots. It may be removed in a later version.

Whether the user is a bot account or webhook.

Type

bool

property display_avatar

The “top-most” avatar for this user, or, the avatar that the client will display in the member list and in chat.

Type

Asset

ServerChannel

class guilded.abc.ServerChannel

An ABC for the various types of server channels.

The following implement this ABC:

property share_url

The share URL of the channel.

Type

str

property jump_url

The share URL of the channel.

Type

str

property group

The group that this channel is in.

Type

Optional[Group]

property server

The server that this channel is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

property category

The category that this channel is in, if any.

Type

Optional[Category]

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await delete()

This function is a coroutine.

Delete this channel.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

Reply

class guilded.abc.Reply

An ABC for replies to posts.

The following implement this ABC:

x == y

Checks if two replies are equal.

x != y

Checks if two replies are not equal.

hash(x)

Returns the reply’s hash.

id

The reply’s ID.

Type

int

content

The reply’s content.

Type

str

created_at

When the reply was created.

Type

datetime.datetime

updated_at

When the reply was last updated.

Type

Optional[datetime.datetime]

property author

The Member that created the reply, if they are cached.

Type

Optional[Member]

property channel

The channel that the reply is in.

Type

ServerChannel

property group

The group that the reply is in.

Type

Group

property server

The server that the reply is in.

Type

Server

Guilded Models

Models are classes that are constructed using data recieved directly from Guilded and are not meant to be created by the user of the library.

Danger

The classes listed below are not intended to be created by users.

For example, this means that you should not make your own User instances nor should you modify a User instance yourself.

If you want to get one of these model classes instances they’d have to be through the cache, and a common way of doing so is through the utils.find() function or attributes of model classes that you receive from the events specified in the Event Reference.

Announcement

class guilded.Announcement

Represents an announcement in an AnnouncementChannel.

x == y

Checks if two announcements are equal.

x != y

Checks if two announcements are not equal.

hash(x)

Returns the hash of the announcement.

str(x)

Returns the title of the announcement.

New in version 1.8.

id

The announcement’s ID.

Type

str

title

The announcement’s title.

Type

str

content

The announcement’s text content.

Type

str

channel

The channel that the announcement is in.

Type

AnnouncementChannel

created_at

When the announcement was created.

Type

datetime.datetime

property server

The server that the announcement is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the announcement is in.

Type

Server

property group

The group that the announcement is in.

Type

Group

property author

The Member that created the announcement.

Type

Optional[Member]

await delete()

This function is a coroutine.

Delete this announcement.

await edit(*, title=..., content=...)

This function is a coroutine.

Edit this announcement.

All parameters are optional.

Parameters
  • title (str) – The title of the announcement.

  • content (str) – The content of the announcement.

Returns

The newly edited announcement.

Return type

Announcement

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this announcement.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this announcement.

Parameters

emote (Emote) – The emote to remove.

await reply(content)

This function is a coroutine.

Reply to this announcement.

Parameters

content (str) – The content of the reply.

Returns

The created reply.

Return type

AnnouncementReply

Raises
  • NotFound – This topic does not exist.

  • Forbidden – You do not have permission to reply to this topic.

  • HTTPException – Failed to reply to this topic.

await fetch_reply(reply_id, /)

This function is a coroutine.

Fetch a reply to this announcement.

Returns

The reply from the ID.

Return type

AnnouncementReply

Raises
  • NotFound – This reply or announcement does not exist.

  • Forbidden – You do not have permission to read this announcement’s replies.

  • HTTPException – Failed to fetch the reply.

await fetch_replies()

This function is a coroutine.

Fetch all replies to this announcement.

Returns

The replies under the announcement.

Return type

List[AnnouncementReply]

Raises
  • NotFound – This announcement does not exist.

  • Forbidden – You do not have permission to read this announcement’s replies.

  • HTTPException – Failed to fetch the replies to this announcement.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

AnnouncementChannel

class guilded.AnnouncementChannel

Represents an announcement channel in a Server.

property blog_url

The blog URL of the announcement channel.

Note

Due to an API limitation, this property cannot check if the channel is set as a blog, and it assumes the slug based on the channel’s name.

Type

Optional[str]

await fetch_announcement(announcement_id, /)

This function is a coroutine.

Fetch an announcement in this channel.

Returns

The announcement from the ID.

Return type

Announcement

await fetch_announcements(*, limit=None, before=None)

This function is a coroutine.

Fetch multiple announcements in this channel.

All parameters are optional.

Parameters
  • limit (int) – The maximum number of announcements to return. Defaults to 25.

  • before (datetime.datetime) – The latest date that an announcement can be from. Defaults to the current time.

Returns

The announcements in the channel.

Return type

List[Announcement]

await create_announcement(*, title, content)

This function is a coroutine.

Create an announcement in this channel.

Parameters
  • title (str) – The title of the announcement.

  • content (str) – The content of the announcement.

Returns

The created announcement.

Return type

Announcement

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

AnnouncementReply

class guilded.AnnouncementReply

Represents a reply to an Announcement.

x == y

Checks if two replies are equal.

x != y

Checks if two replies are not equal.

hash(x)

Returns the reply’s hash.

New in version 1.8.

id

The reply’s ID.

Type

int

content

The reply’s content.

Type

str

parent

The announcement that the reply is a child of.

Type

Announcement

parent_id

The ID of the parent announcement.

Type

int

created_at

When the reply was created.

Type

datetime.datetime

updated_at

When the reply was last updated.

Type

Optional[datetime.datetime]

await edit(*, content)

This function is a coroutine.

Edit this reply.

Parameters

content (str) – The content of the reply.

Returns

The updated reply.

Return type

AnnouncementReply

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to update this reply.

  • HTTPException – Failed to update this reply.

await delete()

This function is a coroutine.

Delete this reply.

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to delete this reply.

  • HTTPException – Failed to delete this reply.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this reply.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this reply.

Parameters

emote (Emote) – The emote to remove.

property author

The Member that created the reply, if they are cached.

Type

Optional[Member]

property channel

The channel that the reply is in.

Type

ServerChannel

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property group

The group that the reply is in.

Type

Group

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property server

The server that the reply is in.

Type

Server

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

Asset

class guilded.Asset

Represents an asset in Guilded.

x == y

Checks if two assets are equal (have the same URL).

x != y

Checks if two assets are not equal.

str(x)

Returns the URL of the asset.

len(x)

Returns the length of the asset’s URL.

bool(x)

Returns True if the asset has a URL.

property url

The underlying URL of the asset.

Type

str

property key

The identifying key of the asset.

Type

str

property aws_url

The underlying URL of the asset on AWS.

Deprecated since version 1.13: This type of URL should no longer be required, and it seems to be getting phased out by Guilded. Use url instead.

Type

str

is_animated()

bool: Returns whether the asset is animated.

Note

This may return false negatives for assets like user or bot avatars which have no definitive indicator.

replace(*, size=None, format=None, static_format=None)

Returns a new asset with the passed components replaced.

Warning

If this asset is a user or bot avatar, you should not replace format because avatars uploaded after 10 May 2022 can only use the webp format.

Parameters
  • size (str) – The new size of the asset. Must be one of ‘Small’, ‘Medium’, ‘Large’, or ‘HeroMd’ or ‘Hero’ if it’s a banner.

  • format (str) – The new format to change it to. Must be one of ‘webp’, ‘jpeg’, ‘jpg’, ‘png’, or ‘gif’ or ‘apng’ if it’s animated.

  • static_format (str) – The new format to change it to if the asset isn’t animated. Must be either ‘webp’, ‘jpeg’, ‘jpg’, or ‘png’.

Raises

InvalidArgument – An invalid size or format was passed.

Returns

The newly updated asset.

Return type

Asset

with_size(size)

Returns a new asset with the specified size.

Parameters

size (str) – The new size of the asset. Must be one of ‘Small’, ‘Medium’, ‘Large’, or ‘HeroMd’ or ‘Hero’ if it’s a banner.

Raises

InvalidArgument – The asset had an invalid size.

Returns

The newly updated asset.

Return type

Asset

with_format(format)

Returns a new asset with the specified format.

Warning

If this asset is a user or bot avatar, you should not use this method because avatars uploaded after 10 May 2022 can only use the webp format.

Parameters

format (str) – The new format of the asset.

Raises

InvalidArgument – The asset had an invalid format.

Returns

The newly updated asset.

Return type

Asset

with_static_format(format)

Returns a new asset with the specified static format.

This only changes the format if the underlying asset is not animated. Otherwise, the asset is not changed.

Parameters

format (str) – The new static format of the asset.

Raises

InvalidArgument – The asset had an invalid format.

Returns

The newly updated asset.

Return type

Asset

Attachment

class guilded.Attachment

An uploaded attachment in a message, announcement, document, or any other place you can upload files inline with content.

url

The URL to the file.

Type

str

file_type

The type of file.

Type

Optional[FileType]

caption

The attachment’s caption.

Type

Optional[str]

size

The attachment’s size in bytes.

Type

Optional[int]

height

The attachment’s height in pixels.

Type

Optional[int]

width

The attachment’s width in pixels.

Type

Optional[int]

property filename

The file’s name.

Type

str

property description

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of caption.

The attachment’s caption.

Type

Optional[str]

await to_file()

This function is a coroutine.

Converts the attachment to an uploadable File instance.

Returns

The attachment as a File.

Return type

File

Availability

class guilded.Availability

Represents an availability in a SchedulingChannel.

x == y

Checks if two availabilities are equal.

x != y

Checks if two availabilities are not equal.

hash(x)

Returns the hash of the availability.

id

The availability’s ID.

Type

int

start

When the availability starts.

Type

datetime.datetime

end

When the availability ends.

Type

datetime.datetime

created_at

When the availabilty was created.

Type

datetime.datetime

updated_at

When the availabilty was updated.

Type

Optional[datetime.datetime]

channel

The channel that the availability is in.

Type

SchedulingChannel

property server

The server that the availability is in.

Type

Server

property group

The group that the availability is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server

The server that the availability is in.

Type

Server

property user

The member that the availability is for.

Type

Optional[Member]

property updated_by

The member that last updated the availability.

Type

Optional[Member]

CalendarChannel

class guilded.CalendarChannel

Represents a calendar channel in a Server.

await create_event(name, *, starts_at, duration=..., description=..., location=..., url=..., colour=..., color=..., all_day=..., rsvp_limit=..., rsvp_disabled=..., autofill_waitlist=..., private=..., roles=..., repeat=...)

This function is a coroutine.

Create an event in this channel.

Parameters
  • name (str) – The name of the event.

  • starts_at (datetime.datetime) – When the event starts.

  • duration (Optional[Union[datetime.timedelta, int]]) – The duration of the event. If this is an int, the value must be in minutes.

  • description (Optional[str]) – The description of the event.

  • location (Optional[str]) – The location of the event.

  • url (Optional[str]) – A URL to associate with the event.

  • colour (Optional[Union[Colour, int]]) – The colour of the event when viewing in the channel. This parameter is also aliased to color.

  • all_day (Optional[bool]) –

    Whether the event should last all day.

    New in version 1.8.

  • rsvp_limit (Optional[int]) –

    The number of RSVPs to allow before waitlisting.

    New in version 1.7.

  • rsvp_disabled (Optional[bool]) –

    Whether users should be disallowed from creating RSVPs for the event.

    New in version 1.8.

  • autofill_waitlist (Optional[bool]) –

    When rsvp_limit is set, whether users from the waitlist should be added as space becomes available in the event.

    New in version 1.8.

  • private (Optional[bool]) – Whether the event should be private.

  • roles (Optional[List[Role]]) –

    The roles to restrict the event to.

    New in version 1.8.

  • repeat (Optional[Union[RepeatInterval, RepeatInfo]]) –

    A basic interval for repeating the event or a RepeatInfo for more detailed repeat options.

    New in version 1.7.

Returns

The created event.

Return type

CalendarEvent

Raises
await fetch_event(event_id, /)

This function is a coroutine.

Fetch an event in this channel from the API.

Returns

The event from the ID.

Return type

CalendarEvent

Raises
  • NotFound – There is no event with the ID.

  • Forbidden – You do not have permissions to get events in this channel.

  • HTTPException – Failed to get the event.

async for ... in events(limit=25, after=None, before=None)

An asynchronous iterator for the events in this channel.

Results are ordered ascending by CalendarEvent.starts_at.

Examples

Usage

async for event in channel.events():
    print(f'{event} starts at {event.starts_at}')

Flattening into a list

events = [event async for event in channel.events()]
# events is now a list of CalendarEvent
Parameters
Yields

CalendarEvent – An event in this channel.

Raises
  • Forbidden – You do not have permissions to get events in this channel.

  • HTTPException – Failed to get the events.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

CalendarEvent

class guilded.CalendarEvent

Represents an event in a CalendarChannel.

x == y

Checks if two events are equal.

x != y

Checks if two events are not equal.

hash(x)

Returns the hash of the event.

str(x)

Returns the name of the event.

x < y

Checks if an event starts before another event.

x > y

Checks if an event starts after another event.

x <= y

Checks if an event starts before or at the same time as another event.

x >= y

Checks if an event starts after or at the same time as another event.

New in version 1.2.

id

The event’s ID.

Type

int

name

The event’s name.

Type

str

description

The event’s description.

Type

Optional[str]

channel

The channel that the event is in.

Type

CalendarChannel

created_at

When the event was created.

Type

datetime.datetime

starts_at

When the event starts.

Type

Optional[datetime.datetime]

location

The location of the event.

Type

Optional[str]

url

A URL to associate with the event. This is not an in-app share link, but rather something that is set by users while creating the event.

Type

Optional[str]

private

Whether the event is private.

Type

bool

repeats

Whether the event is set to repeat.

New in version 1.7.

Type

bool

series_id

The ID of the event series, if applicable.

New in version 1.8.

Type

Optional[str]

role_ids

The role IDs that the event is restricted to. If the event is not restricted, this list is empty.

New in version 1.8.

Type

List[int]

all_day

Whether the event lasts all day.

New in version 1.8.

Type

bool

rsvp_limit

The number of RSVPs to allow before waitlisting RSVPs.

New in version 1.7.

Type

Optional[int]

rsvp_disabled

Whether users are disallowed from creating RSVPs for the event.

New in version 1.8.

Type

Optional[bool]

autofill_waitlist

When rsvp_limit is set, whether users from the waitlist should be added as space becomes available in the event.

New in version 1.8.

Type

Optional[bool]

duration

The duration of the event. Minimum 60 seconds.

Type

Optional[datetime.timedelta]

cancellation_description

The description of the event cancellation, if any.

There is an alias for this attribute called cancelation_description.

Type

Optional[str]

property server

The server that the event is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the event is in.

Type

Server

property group

The group that the event is in.

Type

Group

property author

The member that created the event.

Type

Optional[Member]

property colour

The colour of the event when viewing in the channel.

Type

Optional[Colour]

property color

The colour of the event when viewing in the channel.

Type

Optional[Colour]

property cancelation_description

The description of the event cancelation, if any.

There is an alias for this attribute called cancellation_description.

Type

Optional[str]

property cancelled_by

The member that cancelled the event, if applicable.

There is an alias for this attribute called canceled_by.

Type

Optional[Member]

property canceled_by

The member that canceled the event, if applicable.

There is an alias for this attribute called cancelled_by.

Type

Optional[Member]

property roles

The roles that the event is restricted to. If the event is not restricted, this list is empty.

New in version 1.8.

Type

List[Role]

await edit(*, name=..., description=..., location=..., starts_at=..., url=..., colour=..., color=..., duration=..., all_day=..., rsvp_limit=..., rsvp_disabled=..., autofill_waitlist=..., private=..., roles=..., repeat=..., edit_series=...)

This function is a coroutine.

Edit this event.

All parameters are optional.

Parameters
  • name (str) – The name of the event.

  • description (str) – The description of the event.

  • location (str) – The location of the event.

  • starts_at (datetime.datetime) – When the event starts.

  • url (str) – A URL to associate with the event.

  • colour (Union[Colour, int]) – The colour of the event when viewing in the channel. This parameter is also aliased to color.

  • duration (Union[datetime.timedelta, int]) – The duration of the event. If this is an int, the value must be in minutes.

  • all_day (Optional[bool]) –

    Whether the event should last all day.

    New in version 1.8.

  • rsvp_limit (Optional[int]) –

    The number of RSVPs to allow before waitlisting.

    New in version 1.7.

  • rsvp_disabled (Optional[bool]) –

    Whether users should be disallowed from creating RSVPs for the event.

    New in version 1.8.

  • autofill_waitlist (Optional[bool]) –

    When rsvp_limit is set, whether users from the waitlist should be added as space becomes available in the event.

    New in version 1.8.

  • private (bool) – Whether the event should be private.

  • roles (Optional[List[Role]]) –

    The roles to restrict the event to.

    New in version 1.8.

  • repeat (Optional[Union[RepeatInterval, RepeatInfo]]) –

    A basic interval for repeating the event or a RepeatInfo for more detailed repeat options.

    New in version 1.7.

  • edit_series (bool) –

    Whether to also edit all future events in the series, if applicable.

    New in version 1.7.

Returns

The newly edited event.

Return type

CalendarEvent

Raises
await delete(*, series=None)

This function is a coroutine.

Delete this event.

Parameters

series (Optional[DeleteSeriesType]) –

If the event is part of a series (i.e. repeats is True), sets whether to delete all events in the series or only this one and its subsequent events. If None or not provided, only this event will be deleted.

New in version 1.7.

Raises
  • NotFound – The event has already been deleted.

  • Forbidden – You do not have permissions to delete the event.

  • HTTPException – Failed to delete the event.

await create_rsvp(user, /, *, status)

This function is a coroutine.

Create an RSVP for a user.

This method can also be used for editing an existing RSVP, which may be preferable if all you need to do is edit it.

Parameters
  • user (User) – The user to create an RSVP for.

  • status (RSVPStatus) – The status of the RSVP.

Returns

The newly created RSVP.

Return type

CalendarEventRSVP

Raises
  • Forbidden – You do not have permissions to create an RSVP for another user.

  • HTTPException – Failed to create an RSVP.

await upsert_rsvps(*users, status)

This function is a coroutine.

Upsert (conditionally create or edit) RSVPs for multiple users.

New in version 1.8.

Parameters
  • *users (User) – The users to upsert RSVPs for.

  • status (RSVPStatus) – The status of the RSVPs.

Raises
  • Forbidden – You do not have permissions to upsert RSVPs for other users.

  • HTTPException – Failed to upsert RSVPs.

await fetch_rsvp(user, /)

This function is a coroutine.

Fetch a user’s RSVP to this event.

Returns

The user’s RSVP.

Return type

CalendarEventRSVP

Raises
  • NotFound – This user does not have an RSVP for this event.

  • HTTPException – Failed to fetch this user’s RSVP.

await fetch_rsvps()

This function is a coroutine.

Fetch all RSVPs to this event.

Returns

A user’s RSVP.

Return type

CalendarEventRSVP

Raises

HTTPException – Failed to fetch the RSVPs.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this event.

New in version 1.7.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this event.

New in version 1.7.

Parameters

emote (Emote) – The emote to remove.

await reply(content)

This function is a coroutine.

Reply to this event.

New in version 1.7.

Parameters

content (str) – The content of the reply.

Returns

The created reply.

Return type

CalendarEventReply

Raises
  • NotFound – This event does not exist.

  • Forbidden – You do not have permission to reply to this event.

  • HTTPException – Failed to reply to this event.

await fetch_reply(reply_id, /)

This function is a coroutine.

Fetch a reply to this event.

New in version 1.7.

Returns

The reply from the ID.

Return type

CalendarEventReply

Raises
  • NotFound – This reply or event does not exist.

  • Forbidden – You do not have permission to read this event’s replies.

  • HTTPException – Failed to fetch the reply.

await fetch_replies()

This function is a coroutine.

Fetch all replies to this event.

New in version 1.7.

Returns

The replies under the event.

Return type

List[CalendarEventReply]

Raises
  • NotFound – This event does not exist.

  • Forbidden – You do not have permission to read this event’s replies.

  • HTTPException – Failed to fetch the replies to this event.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

CalendarEventReply

class guilded.CalendarEventReply

Represents a reply to a CalendarEvent.

x == y

Checks if two replies are equal.

x != y

Checks if two replies are not equal.

hash(x)

Returns the reply’s hash.

New in version 1.7.

id

The reply’s ID.

Type

int

content

The reply’s content.

Type

str

parent

The event that the reply is a child of.

Type

CalendarEvent

parent_id

The ID of the parent event.

Type

int

created_at

When the reply was created.

Type

datetime.datetime

updated_at

When the reply was last updated.

Type

Optional[datetime.datetime]

await edit(*, content)

This function is a coroutine.

Edit this reply.

Parameters

content (str) – The content of the reply.

Returns

The updated reply.

Return type

CalendarEventReply

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to update this reply.

  • HTTPException – Failed to update this reply.

await delete()

This function is a coroutine.

Delete this reply.

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to delete this reply.

  • HTTPException – Failed to delete this reply.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this reply.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this reply.

Parameters

emote (Emote) – The emote to remove.

property author

The Member that created the reply, if they are cached.

Type

Optional[Member]

property channel

The channel that the reply is in.

Type

ServerChannel

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property group

The group that the reply is in.

Type

Group

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property server

The server that the reply is in.

Type

Server

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

CalendarEventRSVP

class guilded.CalendarEventRSVP

Represents an RSVP to a CalendarEvent.

x == y

Checks if two RSVPs are equal.

x != y

Checks if two RSVPs are not equal.

New in version 1.2.

event

The event that the RSVP is for.

Type

CalendarEvent

channel_id

The ID of the channel that the RSVP’s event is in.

Type

Optional[str]

server_id

The ID of the server that the RSVP’s event is in.

Type

str

user_id

The ID of the user that the RSVP is for.

Type

str

status

The status of the RSVP.

Type

RSVPStatus

created_at

When the RSVP was created.

Type

datetime.datetime

updated_at

When the RSVP was last updated.

Type

datetime.datetime

property channel

The channel that the RSVP’s event is in.

Type

CalendarChannel

property server

The server that the RSVP’s event is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the RSVP’s event is in.

Type

Server

property group

The group that the event is in.

Type

Group

property author

The member that created the RSVP.

Type

Optional[Member]

property updated_by

The member that last updated the RSVP.

Type

Optional[Member]

property member

The member that the RSVP is for.

Type

Member

await edit(*, status)

This function is a coroutine.

Edit this RSVP.

Parameters

status (RSVPStatus) – The status of the RSVP.

Returns

The newly edited RSVP.

Return type

CalendarEventRSVP

Raises
await delete()

This function is a coroutine.

Delete this RSVP.

Raises
  • Forbidden – You do not have permissions to delete this RSVP.

  • NotFound – This RSVP was already deleted.

  • HTTPException – Failed to delete this RSVP.

Category

class guilded.Category

Represents a channel category.

x == y

Checks if two categories are equal.

x != y

Checks if two categories are not equal.

hash(x)

Returns the category’s hash.

str(x)

Returns the name of the category.

New in version 1.11.

id

The category’s ID.

Type

int

name

The category’s name.

Type

str

priority

The priority of the category in relation to other categories in the group. Higher values are displayed higher in the UI. If this is None, the category is to be sorted descending by created_at.

New in version 1.12.

Type

Optional[int]

created_at

When the category was created.

Type

datetime.datetime

updated_at

When the category was last updated.

Type

Optional[datetime.datetime]

server_id

The ID of the server that the category is in.

Type

str

group_id

The ID of the group that the category is in.

Type

str

property group

The group that this category is in.

Type

Optional[Group]

property server

The server that this category is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this category is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

await edit(*, name=None, priority=None)

This function is a coroutine.

Edit this category.

All parameters are optional.

Parameters
  • name (str) – The category’s name.

  • priority (int) –

    The category’s priority.

    New in version 1.12.

Returns

The newly edited category.

Return type

Category

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this category.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

CategoryRoleOverride

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this category.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

CategoryRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this category.

New in version 1.11.

Returns

The role overrides.

Return type

List[CategoryRoleOverride]

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this category.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

CategoryRoleOverride

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this category.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this category.

New in version 1.11.

Parameters
Returns

The created user override.

Return type

CategoryUserOverride

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this category.

New in version 1.11.

Parameters

user (Member) – The user whose override to fetch.

Returns

The role override.

Return type

CategoryUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this category.

New in version 1.11.

Returns

The role overrides.

Return type

List[CategoryUserOverride]

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this category.

New in version 1.11.

Parameters
  • user (Member) – The user to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

CategoryUserOverride

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this category.

New in version 1.11.

Parameters

user (Member) – The user whose override to delete.

await delete()

This function is a coroutine.

Delete this category.

This method will not delete the category’s channels.

Returns

The deleted category.

Return type

Category

ClientUser

class guilded.ClientUser

Represents the current logged-in user.

property bot

This exists for compatibility with discord.py bots. It may be removed in a later version.

Whether the user is a bot account or webhook.

Type

bool

property display_avatar

The “top-most” avatar for this user, or, the avatar that the client will display in the member list and in chat.

Type

Asset

property mention

The mention string for this user.

This will render and deliver a mention when sent in an Embed.

Type

str

ChatChannel

class guilded.ChatChannel

Represents a chat channel in a Server.

await create_webhook(*, name)

This function is a coroutine.

Create a webhook in this channel.

Parameters

name (str) – The webhook’s name.

Returns

The created webhook.

Return type

Webhook

Raises
  • HTTPException – Creating the webhook failed.

  • Forbidden – You do not have permissions to create a webhook.

await webhooks()

This function is a coroutine.

Fetch the list of webhooks in this channel.

Warning

This endpoint cannot be paginated.

Returns

The webhooks in this channel.

Return type

List[Webhook]

Raises

Forbidden – You do not have permissions to get the webhooks.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

ChatMessage

class guilded.ChatMessage

A message in Guilded.

There is an alias for this class called Message.

x == y

Checks if two messages are equal.

x != y

Checks if two messages are not equal.

hash(x)

Returns the message’s hash.

id

The message’s ID.

Type

str

content

The text content of the message.

Type

str

embeds

The list of embeds in the message. This does not include link unfurl embeds.

Type

List[Embed]

attachments

The list of media attachments in the message.

Type

List[Attachment]

channel

The channel this message was sent in.

Type

ServerChannel

webhook_id

The webhook’s ID that sent the message, if applicable.

Type

Optional[str]

replied_to_ids

A list of message IDs that the message replied to, up to 5.

Type

List[str]

private

Whether the message was sent so that only server moderators and users mentioned in the message can see it.

Type

bool

silent

Whether the message was sent silently, i.e., if this is true then users mentioned in the message were not sent a notification.

Type

bool

pinned

Whether the message is pinned in its channel.

Type

bool

hidden_preview_urls

URLs in content that have been prevented from unfurling as a link preview when displayed in Guilded.

Type

List[str]

created_at

When the message was created.

Type

datetime.datetime

updated_at

When the message was last updated.

Type

Optional[datetime.datetime]

deleted_at

When the message was deleted.

Type

Optional[datetime.datetime]

property server

The server this message was sent in.

Type

Optional[Server]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server this message was sent in.

Type

Optional[Server]

property group

The group that the message is in.

Type

Optional[Group]

property author

The user that created this message, if they are cached.

Type

Optional[Union[Member, User]]

property created_by_bot

Whether this message’s author is a bot or webhook.

Type

bool

property share_url

The share URL of the message.

Type

str

property jump_url

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of share_url.

The share URL of the message.

Type

str

property replied_to

The list of messages that the message replied to.

This property relies on message cache. If you need a list of IDs, consider replied_to_ids instead.

Type

List[ChatMessage]

await delete(*, delay=None)

This function is a coroutine.

Delete this message.

Parameters

delay (Optional[float]) – If provided, the number of seconds to wait in the background before deleting this message. If the deletion fails, then it is silently ignored.

Raises
  • Forbidden – You do not have proper permissions to delete this message.

  • NotFound – This message has already been deleted.

  • HTTPException – Deleting this message failed.

await edit(content=..., *, embed=..., embeds=..., hide_preview_urls=...)

This function is a coroutine.

Edit this message.

Warning

This method overwrites all content previously in the message using the new payload.

Parameters
  • content (str) – The text content of the message.

  • embed (Embed) – An embed in the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds in the message. At present, this can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

Returns

The edited message.

Return type

ChatMessage

Raises
  • NotFound – The message does not exist.

  • Forbidden – The message is not owned by you or it is in a channel you cannot access.

  • HTTPException – Could not edit the message.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this message.

Parameters

emote (Emote) – The emote to add.

await remove_reaction(emote, member=None)

This function is a coroutine.

Remove a reaction from this message.

If the reaction is not your own then manage_messages is required.

New in version 1.9.

Parameters
  • emote (Emote) – The emote to remove.

  • member (Optional[User]) – The member whose reaction to remove. If this is not specified, the client’s reaction will be removed instead.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this message.

Deprecated since version 1.9: Use remove_reaction() instead.

Parameters

emote (Emote) – The emote to remove.

await clear_reaction(emote, /)

This function is a coroutine.

Bulk remove reactions from this message based on their emote.

To remove individual reactions from specific users, see remove_reaction().

New in version 1.9.

Parameters

emote (Emote) – The emote to remove.

await clear_reactions()

This function is a coroutine.

Bulk remove all the reactions from this message.

New in version 1.9.

await reply(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None)

This function is a coroutine.

Reply to this message. This is identical to abc.Messageable.send(), but the reply_to parameter already includes this message.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

await create_thread(name, *, visibility=None)

This function is a coroutine.

Create a new thread under the message.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

await pin()

This function is a coroutine.

Pin this message.

New in version 1.10.

Raises
  • NotFound – The channel or message does not exist.

  • Forbidden – You are not allowed to pin messages in this channel.

  • HTTPException – Failed to pin the message.

await unpin()

This function is a coroutine.

Unpin this message.

New in version 1.10.

Raises
  • NotFound – The channel or message does not exist.

  • Forbidden – You are not allowed to unpin messages in this channel.

  • HTTPException – Failed to unpin the message.

Doc

class guilded.Doc

Represents a doc in a DocsChannel.

x == y

Checks if two docs are equal.

x != y

Checks if two docs are not equal.

hash(x)

Returns the hash of the doc.

str(x)

Returns the title of the doc.

id

The doc’s ID.

Type

int

title

The doc’s title.

Type

str

content

The doc’s text content.

Type

str

channel

The channel that the doc is in.

Type

DocsChannel

created_at

When the doc was created.

Type

datetime.datetime

updated_at

When the doc was last modified.

Type

Optional[datetime.datetime]

property server

The server that the doc is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the doc is in.

Type

Server

property group

The group that the doc is in.

Type

Optional[Group]

property author

The Member that created the doc.

Type

Optional[Member]

property updated_by

The Member that last updated the doc.

Type

Optional[Member]

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this doc.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this doc.

Parameters

emote (Emote) – The emote to remove.

await delete()

This function is a coroutine.

Delete this doc.

await edit(*, title=..., content=...)

This function is a coroutine.

Edit this doc.

Parameters
  • title (str) – The title of the doc.

  • content (str) – The content of the doc.

Returns

The updated doc.

Return type

Doc

await reply(content)

This function is a coroutine.

Reply to this doc.

New in version 1.7.

Parameters

content (str) – The content of the reply.

Returns

The created reply.

Return type

DocReply

Raises
await fetch_reply(reply_id, /)

This function is a coroutine.

Fetch a reply to this doc.

New in version 1.7.

Returns

The reply from the ID.

Return type

DocReply

Raises
  • NotFound – This reply or doc does not exist.

  • Forbidden – You do not have permission to read this doc’s replies.

  • HTTPException – Failed to fetch the reply.

await fetch_replies()

This function is a coroutine.

Fetch all replies to this doc.

New in version 1.7.

Returns

The replies under the doc.

Return type

List[DocReply]

Raises
  • NotFound – This doc does not exist.

  • Forbidden – You do not have permission to read this doc’s replies.

  • HTTPException – Failed to fetch the replies to this doc.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

DocReply

class guilded.DocReply

Represents a reply to a Doc.

x == y

Checks if two replies are equal.

x != y

Checks if two replies are not equal.

hash(x)

Returns the reply’s hash.

New in version 1.7.

id

The reply’s ID.

Type

int

content

The reply’s content.

Type

str

parent

The doc that the reply is a child of.

Type

Doc

parent_id

The ID of the parent doc.

Type

int

created_at

When the reply was created.

Type

datetime.datetime

updated_at

When the reply was last updated.

Type

Optional[datetime.datetime]

await edit(*, content)

This function is a coroutine.

Edit this reply.

Parameters

content (str) – The content of the reply.

Returns

The updated reply.

Return type

DocReply

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to update this reply.

  • HTTPException – Failed to update this reply.

await delete()

This function is a coroutine.

Delete this reply.

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to delete this reply.

  • HTTPException – Failed to delete this reply.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this reply.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this reply.

Parameters

emote (Emote) – The emote to remove.

property author

The Member that created the reply, if they are cached.

Type

Optional[Member]

property channel

The channel that the reply is in.

Type

ServerChannel

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property group

The group that the reply is in.

Type

Group

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property server

The server that the reply is in.

Type

Server

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

DocsChannel

class guilded.DocsChannel

Represents a docs channel in a Server.

property docs

The list of docs in this channel.

Type

List[Doc]

get_doc(doc_id, /)

Optional[Doc]: Get a doc in this channel.

await create_doc(*, title, content)

This function is a coroutine.

Create a new doc in this channel.

Parameters
  • title (str) – The doc’s title.

  • content (str) – The content to create the doc with.

Returns

The created doc.

Return type

Doc

await fetch_doc(doc_id, /)

This function is a coroutine.

Fetch an doc in this channel.

Returns

The doc by the ID.

Return type

Doc

await fetch_docs(*, limit=None, before=None)

This function is a coroutine.

Fetch multiple docs in this channel.

All parameters are optional.

Parameters
  • limit (int) – The maximum number of docs to return. Defaults to 25, can be at most 100.

  • before (datetime.datetime) – The latest date that an doc can be from. Defaults to the current time.

Returns

The docs in the channel.

Return type

List[Doc]

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

Emote

class guilded.Emote

Represents a server or stock emote in Guilded.

x == y

Checks if two emotes are equal.

x != y

Checks if two emotes are not equal.

hash(x)

Returns the emote’s hash.

str(x)

Returns the name of the emote.

Changed in version 1.13: If the official markdown feature is enabled, returns a markdown string for mentioning the emote instead.

id

The emote’s ID.

Type

int

name

The emote’s name.

Type

str

stock

Whether the emote is a stock emote (Unicode or by Guilded).

Type

bool

server_id

The ID of the server that the emote is from, if any.

Type

Optional[str]

property author

The Member who created the custom emote, if any.

Type

Optional[Member]

property server

The server that the emote is from, if any.

Type

Optional[Server]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the emote is from, if any.

Type

Optional[Server]

property animated

Whether the emote is animated.

Type

bool

property url

The emote’s CDN URL.

Type

str

url_with_format(format)

Returns a new URL with a different format. By default, the format will be apng if provided, else webp.

This is functionally a more restricted version of Asset.with_format(); that is, only formats that are available to emotes can be used in an attempt to avoid generating nonfunctional URLs.

Parameters

format (str) – The new format to change it to. Must be ‘png’ or ‘webp’ if stock unicode or custom, and ‘png’, ‘webp’, or ‘apng’ if stock Guilded.

Returns

The emote’s newly updated CDN URL.

Return type

str

Raises

InvalidArgument – Invalid format provided.

url_with_static_format(format)

Returns a new URL with a different format if the emote is static, else the current (animated) URL is returned.

This is functionally a more restricted version of Asset.with_static_format(); that is, only formats that are available to emotes can be used in an attempt to avoid generating nonfunctional URLs.

Parameters

format (str) – The new format to change it to. Must be one of ‘png’ or ‘webp’.

Returns

The emote’s newly updated CDN URL.

Return type

str

Raises

InvalidArgument – Invalid format provided.

File

class guilded.File

Wraps files pre- and mid-upload.

bytes(x)

Returns the bytes of the underlying file.

Parameters
  • fp (Union[os.PathLike, io.BufferedIOBase]) – The file to upload. If passing a file with open, the file should be opened in rb mode.

  • filename (Optional[str]) – The name of this file.

  • file_type (FileType) – The file’s file type. If this could not be detected by the library, defaults to FileType.image.

fp

The file ready to be uploaded to Guilded.

Type

Union[os.PathLike, io.BufferedIOBase]

filename

The name of the file.

Type

Optional[str]

type

The file’s media type. This correlates to what the file is being uploaded for (e.g., an avatar) rather than the type of file that it is (e.g., an image). This will usually be set by the library before uploading.

Type

Optional[MediaType]

file_type

The file’s file type.

Type

FileType

url

The URL to the file on Guilded’s CDN after being uploaded by the library.

Type

Optional[str]

set_media_type(media_type)

Manually set this file’s media type.

set_file_type(file_type)

Manually set this file’s file type.

FlowBot

class guilded.FlowBot

Represents a flowbot in a Server.

id

The flowbot’s ID.

Type

str

name

The flowbot’s name.

Type

str

enabled

Whether the flowbot is enabled.

Type

str

icon

The flowbot’s default or set icon.

Type

Asset

created_at

When the flowbot was created.

Type

Optional[str]

deleted_at

When the flowbot was deleted.

Type

Optional[str]

property server

The server that this flowbot is in.

Type

Server

property guild

This is an alias of server.

Type

Server

property author

The user that created this flowbot.

Type

Optional[Member]

property member

This bot’s member object in this server.

Type

Optional[Member]

property flows

The cached list of flows for this flowbot.

Type

List[Flow]

property mention

The mention string of this flowbot’s member object. This is roughly equivalent to flowbot.member.mention.

Type

str

ForumChannel

class guilded.ForumChannel

Represents a forum channel in a Server.

await create_topic(*, title, content)

This function is a coroutine.

Create a new topic in this forum.

Parameters
  • title (str) – The title to create the topic with.

  • content (str) – The text content to include in the body of the topic.

Returns

The topic that was created.

Return type

ForumTopic

await create_thread(*, name, content=None, **kwargs)

This function is a coroutine.

This exists for compatibility with discord.py bots. It may be removed in a later version.

Create a new topic in this forum.

Parameters
  • name (str) – The title to create the topic with.

  • content (Optional[str]) – The content to create the topic with.

Returns

The topic that was created.

Return type

ForumTopic

await fetch_topic(topic_id, /)

This function is a coroutine.

Fetch a topic from this forum.

Returns

The topic by its ID.

Return type

ForumTopic

async for ... in topics(limit=25, before=None)

An asynchronous iterator for the events in this channel.

Examples

Usage

async for topic in channel.topics():
    print(f"{topic}'s last activity was at {topic.bumped_at or topic.created_at}")

Flattening into a list

topics = [topic async for topic in channel.topics()]
# topics is now a list of ForumTopic
Parameters
  • limit (Optional[int]) – The maximum number of topics to return. Defaults to 25 if not specified.

  • before (Optional[Union[ForumTopic, datetime.datetime]]) – The topic to stop pagination at.

Yields

ForumTopic – An topic in this channel.

Raises
  • Forbidden – You do not have permissions to get topics in this channel.

  • HTTPException – Failed to get the topics.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

ForumTopic

class guilded.ForumTopic

Represents a forum topic.

x == y

Checks if two topics are equal.

x != y

Checks if two topics are not equal.

hash(x)

Returns the hash of the topic.

str(x)

Returns the title of the topic.

id

The topic’s ID.

Type

int

title

The topic’s title.

Type

str

content

The topic’s content.

Type

Optional[str]

channel

The forum channel that the topic is in.

Type

ForumChannel

created_at

When the topic was created.

Type

datetime.datetime

updated_at

When the topic was last updated.

Type

Optional[datetime.datetime]

bumped_at

When the topic was last bumped.

Type

Optional[datetime.datetime]

pinned

Whether the topic is pinned.

Type

bool

locked

Whether the topic is locked.

Type

bool

property server

The server that the topic is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the topic is in.

Type

Server

property group

The group that the topic is in.

Type

Optional[Group]

property author

The Member that created the topic.

Type

Optional[Member]

property share_url

The share URL of the topic.

Type

str

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this topic.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this topic.

Parameters

emote (Emote) – The emote to remove.

await edit(*, title=..., content=...)

This function is a coroutine.

Edit this topic.

All parameters are optional.

Parameters
  • title (str) – The title of the topic.

  • content (str) – The content of the topic.

Returns

The newly edited topic.

Return type

ForumTopic

await delete()

This function is a coroutine.

Delete this topic.

Raises
  • NotFound – This topic does not exist.

  • Forbidden – You do not have permission to delete this topic.

  • HTTPException – Failed to delete this topic.

await pin()

This function is a coroutine.

Pin (sticky) this topic.

New in version 1.4.

Raises
await sticky()

This function is a coroutine.

Pin (sticky) this topic.

New in version 1.4.

Raises
await unpin()

This function is a coroutine.

Unpin (unsticky) this topic.

New in version 1.4.

Raises
await unsticky()

This function is a coroutine.

Unpin (unsticky) this topic.

New in version 1.4.

Raises
await lock()

This function is a coroutine.

Lock this topic.

New in version 1.4.

Raises
await unlock()

This function is a coroutine.

Unlock this topic.

New in version 1.4.

Raises
  • NotFound – This topic does not exist.

  • Forbidden – You do not have permission to unlock this topic.

  • HTTPException – Failed to unlock this topic.

await reply(content)

This function is a coroutine.

Reply to this topic.

New in version 1.5.

Parameters

content (str) – The content of the reply.

Returns

The created reply.

Return type

ForumTopicReply

Raises
  • NotFound – This topic does not exist.

  • Forbidden – You do not have permission to reply to this topic.

  • HTTPException – Failed to reply to this topic.

await fetch_reply(reply_id, /)

This function is a coroutine.

Fetch a reply to this topic.

New in version 1.5.

Returns

The reply from the ID.

Return type

ForumTopicReply

Raises
  • NotFound – This reply or topic does not exist.

  • Forbidden – You do not have permission to read this topic’s replies.

  • HTTPException – Failed to fetch the reply.

await fetch_replies()

This function is a coroutine.

Fetch all replies to this topic.

New in version 1.5.

Returns

The replies under the topic.

Return type

List[ForumTopicReply]

Raises
  • NotFound – This topic does not exist.

  • Forbidden – You do not have permission to read this topic’s replies.

  • HTTPException – Failed to fetch the replies to this topic.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

ForumTopicReply

class guilded.ForumTopicReply

Represents a reply to a ForumTopic.

x == y

Checks if two replies are equal.

x != y

Checks if two replies are not equal.

hash(x)

Returns the reply’s hash.

New in version 1.5.

id

The reply’s ID.

Type

int

content

The reply’s content.

Type

str

parent

The topic that the reply is a child of.

Type

ForumTopic

parent_id

The ID of the parent topic.

Type

int

created_at

When the reply was created.

Type

datetime.datetime

updated_at

When the reply was last updated.

Type

Optional[datetime.datetime]

await edit(*, content)

This function is a coroutine.

Edit this reply.

Parameters

content (str) – The content of the reply.

Returns

The updated reply.

Return type

ForumTopicReply

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to update this reply.

  • HTTPException – Failed to update this reply.

await delete()

This function is a coroutine.

Delete this reply.

Raises
  • NotFound – This reply does not exist.

  • Forbidden – You do not have permission to delete this reply.

  • HTTPException – Failed to delete this reply.

await add_reaction(emote, /)

This function is a coroutine.

Add a reaction to this reply.

New in version 1.6.

Parameters

emote (Emote) – The emote to add.

await remove_self_reaction(emote, /)

This function is a coroutine.

Remove one of your reactions from this reply.

New in version 1.6.

Parameters

emote (Emote) – The emote to remove.

property author

The Member that created the reply, if they are cached.

Type

Optional[Member]

property channel

The channel that the reply is in.

Type

ServerChannel

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property group

The group that the reply is in.

Type

Group

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property server

The server that the reply is in.

Type

Server

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

Group

class guilded.Group

Represents a server group in Guilded.

x == y

Checks if two groups are equal.

x != y

Checks if two groups are not equal.

hash(x)

Returns the group’s hash.

str(x)

Returns the name of the group.

server

The server that the group is in.

Type

Server

id

The group’s id.

Type

str

name

The group’s name.

Type

str

description

The group’s description.

Type

Optional[str]

home

Whether the group is the home group of its server.

Type

bool

public

Whether the group is able to be joined by anyone.

Type

bool

emote_id

The ID of the emote associated with the group, if any.

Type

Optional[int]

created_at

When the group was created.

Type

datetime.datetime

updated_at

When the group was last updated.

Type

Optional[datetime.datetime]

archived_at

When the group was archived, if applicable.

Type

Optional[datetime.datetime]

property archived

Whether this group is archived.

Type

bool

property display_avatar

The group’s displayed avatar. If home is True, this will be the server’s avatar instead.

Type

Optional[Asset]

property author

The member who created the group.

Type

Optional[Member]

property updated_by

The member who last updated the group, if any.

Type

Optional[Member]

property archived_by

The member who archived the group, if any.

Type

Optional[Member]

await edit(*, name=..., description=..., emote=..., public=...)

This function is a coroutine.

Edit the group.

All parameters are optional.

New in version 1.9.

Parameters
  • name (str) – The name of the group.

  • description (str) – The description of the group.

  • emote (Emote) – The emote associated with the group.

  • public (bool) – Whether the group is public.

Raises
Returns

The newly edited group.

Return type

Group

await delete()

This function is a coroutine.

Delete the group.

New in version 1.9.

Raises
await add_member(member, /)

This function is a coroutine.

Add a member to this group.

Raises
  • NotFound – This group has been deleted or the member does not exist.

  • Forbidden – You do not have permission to add the member to this group.

  • HTTPException – Failed to add the member to this group.

await remove_member(member, /)

This function is a coroutine.

Remove a member from this group.

Raises
  • NotFound – This group has been deleted or the member does not exist.

  • Forbidden – You do not have permission to remove the member from this group.

  • HTTPException – Failed to remove the member from this group.

await create_category(name)

This function is a coroutine.

Create a new category in the group.

New in version 1.11.

Parameters

name (str) – The category’s name.

Returns

The created category.

Return type

Category

Invite

class guilded.Invite

Represents an invite that can be used to add members to a Server.

x == y

Checks if two invites are equal.

x != y

Checks if two invites are not equal.

hash(x)

Returns the invite’s hash.

str(x)

Returns the URL of the invite.

id

The invite’s ID.

Type

str

code

The URL fragment used for the invite. This could be the same as id or the server’s slug.

Type

str

server

The server that the invite is for.

Type

Server

inviter

The user that created the invite.

Type

User

property url

The full URL of the invite.

Type

str

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the invite is for.

Type

Server

ListChannel

class guilded.ListChannel

Represents a list channel in a Server.

property items

The list of items in this channel.

Type

List[ListItem]

get_item(id)

Optional[ListItem]: Get an item in this channel.

await fetch_item(item_id, /)

This function is a coroutine.

Fetch an item in this channel.

Returns

The item by the ID.

Return type

ListItem

await fetch_items()

This function is a coroutine.

Fetch all items in this channel.

Returns

The items in this channel.

Return type

List[ListItem]

await create_item(message, *, note_content=None)

This function is a coroutine.

Create an item in this channel.

Parameters
  • message (str) – The text content to include as the main message of the item.

  • note_content (Optional[str]) – The item’s note content.

Returns

The created item.

Return type

ListItem

await create_webhook(*, name)

This function is a coroutine.

Create a webhook in this channel.

Parameters

name (str) – The webhook’s name.

Returns

The created webhook.

Return type

Webhook

Raises
  • HTTPException – Creating the webhook failed.

  • Forbidden – You do not have permissions to create a webhook.

await webhooks()

This function is a coroutine.

Fetch the list of webhooks in this channel.

Warning

This endpoint cannot be paginated.

Returns

The webhooks in this channel.

Return type

List[Webhook]

Raises

Forbidden – You do not have permissions to get the webhooks.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

ListItem

class guilded.ListItem

Represents an item in a ListChannel.

x == y

Checks if two items are equal.

x != y

Checks if two items are not equal.

hash(x)

Returns the hash of the item.

id

The item’s ID.

Type

str

created_at

When the item was created.

Type

datetime.datetime

message

The main message of the item.

Type

str

note

The item’s note.

Type

ListItemNote

updated_at

When the item was last updated.

Type

Optional[datetime.datetime]

completed_at

When the item was marked as completed.

Type

Optional[datetime.datetime]

parent_id

The ID of the item’s parent, if the item is nested.

Type

Optional[str]

webhook_id

The ID of the webhook that created the item, if applicable.

Type

Optional[str]

property server

The server that the item is in.

Chances are that this will only be None for partial webhook responses.

Type

Optional[Server]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the item is in.

Type

Optional[Server]

property channel

The channel that the item is in.

Type

ListChannel

property group

The group that the item is in.

Type

Group

property author

The Member that created the item.

Type

Optional[Member]

property updated_by

The Member that last updated the item.

Type

Optional[Member]

property completed_by

The Member that marked the the item as completed.

Type

Optional[Member]

property share_url

The share URL of the item.

Type

str

property assigned_to

The members that the item is assigned to, designated by the user & role mentions in message.

Type

List[Member]

property parent

The item that this item is a child of.

Type

Optional[ListItem]

has_note()

bool: Whether the item has a note.

await fetch_parent()

This function is a coroutine.

Fetch the item that this item is a child of, if it exists.

Returns

The item’s parent.

Return type

ListItem

Raises

ValueError – This item has no parent.

await fetch_note()

This function is a coroutine.

Fetch this item’s note. This should only be necessary if you obtained this object through ListChannel.fetch_items().

Returns

This item’s note.

Return type

ListItemNote

await delete()

This function is a coroutine.

Delete this item.

await edit(*, message=..., note_content=...)

This function is a coroutine.

Edit this item.

All parameters are optional.

Parameters
  • message (str) – The text content to set as the main message of the item.

  • note_content (str) – The item’s note content.

Returns

The newly edited item.

Return type

ListItem

await complete()

This function is a coroutine.

Mark this list item as complete.

If this item has any children, they will also be marked as complete.

await uncomplete()

This function is a coroutine.

Mark this list item as incomplete.

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

ListItemNote

class guilded.ListItemNote

Represents the note on a ListItem.

parent

The note’s parent item.

Type

ListItem

content

The note’s content.

Type

Optional[str]

created_at

When the note was created.

Type

datetime.datetime

updated_at

When the note was last updated.

Type

Optional[datetime.datetime]

property server

The server that the note’s parent item is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the note’s parent item is in.

Type

Server

property group

The group that the note’s parent item is in.

Type

Group

property channel

The channel that the note’s parent item is in.

Type

ListChannel

property author

The Member that created the note.

Type

Optional[Member]

property updated_by

The Member that last updated the note.

Type

Optional[Member]

await delete()

This function is a coroutine.

Delete this note.

await edit(*, content=...)

This function is a coroutine.

Edit this note.

Parameters

content (str) – The text content of the note.

Returns

The newly edited note.

Return type

ListItemNote

property channel_mentions

The list of channels that are mentioned in the content.

Type

List[ServerChannel]

property mention_everyone

Whether the content mentions @everyone.

Type

bool

property mention_here

Whether the content mentions @here.

Type

bool

property mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

property raw_channel_mentions

A list of channel IDs for the channels that are mentioned in the content.

This is useful if you need the channels that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_mentions

This exists for compatibility with discord.py bots. It may be removed in a later version.

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property raw_role_mentions

A list of role IDs for the roles that are mentioned in the content.

This is useful if you need the roles that are mentioned but do not care about their resolved data.

Type

List[int]

property raw_user_mentions

A list of user IDs for the users that are mentioned in the content.

This is useful if you need the users that are mentioned but do not care about their resolved data.

Type

List[str]

property role_mentions

The list of roles that are mentioned in the content.

Type

List[Role]

property user_mentions

The list of users who are mentioned in the content.

Type

List[Union[Member, User]]

Media

class guilded.Media

Represents a media post in a MediaChannel.

x == y

Checks if two medias are equal.

x != y

Checks if two medias are not equal.

hash(x)

Returns the hash of the media.

str(x)

Returns the URL of the media.

len(x)

Returns the length of the media’s URL.

id

The media’s ID.

Type

int

title

The media’s title.

Type

str

description

The media’s description.

Type

str

url

The media’s URL on Guilded’s CDN.

Type

str

thumbnail

An asset for the media’s thumbnail.

Type

Optional[Asset]

channel

The channel that the media is in.

Type

MediaChannel

public

Whether the media is public.

Type

bool

created_at

When the media was created.

Type

datetime.datetime

reply_count

How many replies the media has.

Type

int

property server

The server that the media is in.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that the media is in.

Type

Server

property group

The group that the media is in.

Type

Group

property author

The member that created this media.

Type

Optional[Member]

await read()

This function is a coroutine.

Fetches the raw data of this media as a bytes.

Returns

The raw data of this media.

Return type

bytes

MediaChannel

class guilded.MediaChannel

Represents a media channel in a Server.

property medias

The list of cached medias in this channel.

Type

List[Media]

get_media(id)

Optional[Media]: Get a cached media post in this channel.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

Member

class guilded.Member

Represents a member of a Server.

x == y

Checks if two members are equal. Note that this works with User instances too.

x != y

Checks if two members are not equal. Note that this works with User instances too.

hash(x)

Returns the member’s hash.

str(x)

Returns the member’s name.

joined_at

When the member joined their server. This may be None if the member object was partial.

Type

Optional[datetime.datetime]

nick

The member’s nickname, if any.

Type

Optional[str]

xp

The member’s XP. If this is None, do not assume 0.

Type

Optional[int]

property id

Equivalent to User.id

property name

Equivalent to User.name

property created_at

Equivalent to User.created_at

property default_avatar

Equivalent to User.default_avatar

property avatar

Equivalent to User.avatar

property dm_channel

Equivalent to User.dm_channel

property banner

Equivalent to User.banner

property server

The server that this member is from.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

property roles

The cached list of roles that this member has.

Type

List[Role]

property server_permissions

The server-level permissions that this member has.

This only considers the permissions immediately granted by the member’s roles and not any channel permission overwrites.

This does take into consideration server ownership.

New in version 1.9.

Type

Permissions

property guild_permissions

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server_permissions.

Type

Permissions

is_owner()

bool: Whether this member is the owner of their server.

This may incorrectly be False when the member and server are both partial.

await set_nickname(nickname, /)

This function is a coroutine.

Set this member’s nickname. Use None to remove their nickname.

Returns

The member’s nickname after the operation.

Return type

Optional[str]

Raises
  • NotFound – This member does not exist.

  • Forbidden – You are not allowed to edit this member’s nickname. You can never edit a member who is above you in the role hierarchy.

  • HTTPException – Failed to set this member’s nickname.

await edit(*, nick=..., roles=..., xp=..., **kwargs)

This function is a coroutine.

Edit this member.

Depending on the parameters provided, this method requires different permissions:

Parameter

Permission

nick

Permissions.manage_nicknames

roles

Permissions.manage_roles

xp

Permissions.manage_server_xp

All parameters are optional.

Parameters
  • nick (str) – A new nickname. Use None to remove their nickname.

  • roles (List[Role]) – The member’s new list of roles. This replaces the roles. Providing this parameter causes your client to make multiple API requests.

  • xp (int) –

    The member’s new total XP.

    New in version 1.3.

Raises
  • NotFound – This member does not exist.

  • Forbidden – You are not allowed to edit this member. You can never edit a member who is above you in the role hierarchy.

  • HTTPException – Failed to edit this member.

await ban(**kwargs)

This function is a coroutine.

Ban this member. Equivalent to Server.ban().

await unban()

This function is a coroutine.

Unban this member. Equivalent to Server.unban().

await kick()

This function is a coroutine.

Kick this member. Equivalent to Server.kick().

await add_role(role)

This function is a coroutine.

Add a role to this member.

Parameters

role (Role) – The role to give this member.

await add_roles(*roles)

This function is a coroutine.

This exists for compatibility with discord.py bots. It may be removed in a later version.

Add roles to this member.

Parameters

roles (List[Role]) – The roles to add to the member.

await remove_role(role)

This function is a coroutine.

Remove a role from this member.

Parameters

role (Role) – The role to remove from member.

await remove_roles(*roles)

This function is a coroutine.

This exists for compatibility with discord.py bots. It may be removed in a later version.

Remove roles from this member.

Parameters

roles (List[Role]) – The roles to remove from the member.

await fetch_role_ids()

This function is a coroutine.

Fetch the list of role IDs assigned to this member.

Returns

The IDs of the roles that the member has.

Return type

List[int]

This function is a coroutine.

Fetch one of this member’s social links.

New in version 1.3.

Parameters

social_link_type (SocialLinkType) – The type of social link to get.

Returns

The member’s social link on the external service.

Return type

SocialLink

Raises
await award_xp(amount, /)

This function is a coroutine.

Award XP to this member.

Note

This method modifies the current value, it does not replace it. To set total XP, use set_xp().

Parameters

amount (int) – The amount of XP to award. Could be a negative value to remove XP.

Returns

The total amount of XP this member has after the operation.

Return type

int

await set_xp(total, /)

This function is a coroutine.

Set this member’s total XP.

Note

This method replaces the current value. To add or subtract XP, use award_xp().

New in version 1.3.

Parameters

total (int) – The total amount of XP this member should have.

Returns

The total amount of XP this member has after the operation.

Return type

int

await fetch_permissions()

This function is a coroutine.

Fetch this member’s server permissions.

New in version 1.9.1.

Returns

The permissions that this member has.

Return type

Permissions

Raises
property badges

Equivalent to User.badges

property bio

Equivalent to User.bio

property blocked_at

Equivalent to User.blocked_at

property bot

Equivalent to User.bot

property bot_id

Equivalent to User.bot_id

property color

Equivalent to User.color

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

property display_avatar

Equivalent to User.display_avatar

property display_name

Equivalent to User.display_name

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

property games

Equivalent to User.games

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

property mention

Equivalent to User.mention

property moderation_status

Equivalent to User.moderation_status

property online_at

Equivalent to User.online_at

property presence

Equivalent to User.presence

property profile_url

Equivalent to User.profile_url

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property status

Equivalent to User.status

property stonks

Equivalent to User.stonks

property subdomain

Equivalent to User.subdomain

property tagline

Equivalent to User.tagline

property type

Equivalent to User.type

property vanity_url

Equivalent to User.vanity_url

MemberBan

class guilded.MemberBan

Represents a ban created in a Server.

x == y

Checks if two bans are equal.

x != y

Checks if two bans are not equal.

user

The user that is banned.

Type

Union[Member, User]

reason

The reason for the ban.

Type

Optional[str]

created_at

When the ban was created.

Type

datetime.datetime

server

The server that the ban is in.

Type

Server

author_id

The user’s ID who created the ban.

Type

str

property author

The user who created the ban.

Type

Optional[Member]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

await revoke()

This function is a coroutine.

Revoke this ban; unban the user it was created for.

This is equivalent to Server.unban().

Mentions

class guilded.Mentions

Represents mentions in Guilded content. This data is determined and sent by Guilded rather than being parsed by the library.

everyone

Whether @everyone was mentioned.

Type

bool

here

Whether @here was mentioned.

Type

bool

property users

The list of users who were mentioned.

Type

List[Union[Member, User]]

property channels

The list of channels that were mentioned.

An empty list is always returned in a DM context.

Type

List[ServerChannel]

property roles

The list of roles that were mentioned.

An empty list is always returned in a DM context.

Type

List[Role]

await fill(*, ignore_cache=False, ignore_errors=False)

This function is a coroutine.

Fetch & fill the internal cache with the targets referenced.

Parameters
  • ignore_cache (bool) – Whether to fetch objects even if they are already cached. Defaults to False if not specified.

  • ignore_errors (bool) – Whether to ignore HTTPExceptions that occur while fetching. Defaults to False if not specified.

PartialMessageable

class guilded.PartialMessageable

Represents a partial messageable to aid with working messageable channels when only a channel ID is present.

The only way to construct this class is through Client.get_partial_messageable().

Note that this class is trimmed down and has no rich attributes.

New in version 1.4.

x == y

Checks if two partial messageables are equal.

x != y

Checks if two partial messageables are not equal.

hash(x)

Returns the partial messageable’s hash.

id

The channel ID associated with this partial messageable.

Type

str

server_id

The server ID associated with this partial messageable.

Type

Optional[str]

type

The channel type associated with this partial messageable, if given.

Type

Optional[ChannelType]

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property server

The server this partial messageable is in.

Type

Optional[Server]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server this partial messageable is in.

Type

Optional[Server]

property group

The group that this partial messageable is in.

Type

Optional[Group]

property share_url

Returns a URL that allows the client to jump to the channel.

Type

str

property jump_url

Returns a URL that allows the client to jump to the channel.

Type

str

property created_at

Returns the channel’s creation time in UTC.

This function exists for compatibility with other channel types. Since partial messageables cannot determine their creation date from only their UUID, this will always return 1/1/2016.

Type

datetime.datetime

Reaction

class guilded.Reaction

Represents an emoji reaction on an instance of content (represented by parent).

parent

The content that the reaction is on.

Type

ChatMessage

message

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of parent

The content that the reaction is on.

Type

ChatMessage

emote

The emote that the reaction shows.

Type

Emote

user

If in the context of a reaction event, this is the user who added or removed the reaction. For most cases, users() should be used instead.

Type

Optional[Union[Member, User]]

property emoji

This is an alias of emote.

The emote that the reaction shows.

Type

Emote

property me

Whether the client added the reaction.

Type

bool

property count

How many users have added this reaction.

Type

int

property channel

The channel that the reaction is in.

Type

ServerChannel

is_custom_emote()

bool: Whether this reaction uses a custom emote.

is_custom_emoji()

bool: Whether this reaction uses a custom emote.

await remove_self()

This function is a coroutine.

Remove this reaction for yourself.

You cannot remove other users’ reactions.

async for ... in users(*, limit=None, after=None)

An asynchronous iterator for the users that have reacted with this emote to this content.

Results may not be in any expected order.

Examples

Usage

async for user in reaction.users():
    print(f'{user} reacted with {reaction.emote}')

Flattening into a list

users = [user async for user in reaction.users()]
# users is now a list of User
winner = random.choice(users)
await channel.send(f'Out of all {reaction.count} entrants, {winner} has won our completely unbiased contest.')
Parameters
  • limit (Optional[int]) – The maximum number of users to return.

  • after (Optional[User]) – The user to begin pagination at. This may be an Object.

Yields

Union[User, Member] – The user that created the reaction. This will be a User if there is no server or if the Member is otherwise unavailable.

Raises

Role

class guilded.Role

Represents a role in a Server.

x == y

Checks if two roles are equal.

x != y

Checks if two roles are not equal.

hash(x)

Returns the role’s hash.

str(x)

Returns the name of the role.

id

The role’s ID.

Type

int

name

The role’s name.

Type

str

created_at

When the role was created.

Type

Optional[datetime.datetime]

updated_at

When the role was last updated.

Type

Optional[datetime.datetime]

priority

The role’s priority in the role hierarchy. Could be zero or negative.

Type

int

mentionable

Whether members may mention this role.

Type

bool

self_assignable

Whether members may add themselves to this role without requiring permissions to manage roles.

Type

bool

displayed_separately

Whether the role is displayed seperately (or “hoisted”) in the member list.

Type

bool

base

Whether the role is the base Member role.

Type

bool

bot_user_id

The user ID of the bot that the role was created for. If this is present, it means the role cannot be deleted normally or assigned to other members.

Type

Optional[str]

property mention

The mention string for this role.

When sent in an Embed, this will render a role mention, but it will not notify anybody.

Type

str

property server

The server that this role is from.

Type

Server

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this role is from.

Type

Server

property colours

The colour(s) of the role. If there are two values, the second indicates the end of the gradient.

New in version 1.9.

Type

List[Colour]

property colors

The colour(s) of the role. If there are two values, the second indicates the end of the gradient.

New in version 1.9.

Type

List[Colour]

property colour

The primary colour of the role.

Type

Colour

property color

The primary colour of the role.

Type

Colour

property members

The list of members that have this role.

Type

List[Member]

property icon

The role’s icon asset, if any.

New in version 1.9.

Type

Optional[Asset]

property display_icon

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of icon.

The role’s icon asset, if any.

Type

Optional[Asset]

property hoist

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of displayed_separately.

Type

bool

property permissions

The permissions that the role has.

Type

Permissions

property position

This exists for compatibility with discord.py bots. It may be removed in a later version.

The role’s priority in the role hierarchy. Could be zero or negative.

Type

int

property bot_member

The bot member that this managed role is assigned to.

Type

Optional[Member]

is_bot_managed()

bool: Whether the role is associated with a specific bot in the server.

is_default()

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of base.

is_assignable()

bool: Whether the bot can give the role to users.

Does not account for your permissions.

await award_xp(amount)

This function is a coroutine.

Award XP to all members with this role. Could be a negative value to remove XP.

Parameters

amount (int) – The amount of XP to award.

await edit(*, name=..., permissions=..., priority=..., colours=..., colors=..., colour=..., color=..., displayed_separately=..., hoist=..., self_assignable=..., mentionable=...)

This function is a coroutine.

Update the role.

All parameters are optional.

New in version 1.9.

Parameters
  • name (str) – The name of the role.

  • permissions (Permissions) – The permissions for the role.

  • priority (int) –

    The priority of the role in the role hierarchy. Could be zero or negative.

    New in version 1.12.

  • colours (List[Union[Colour, int]]) – The colour(s) of the role. If there are two values, the second indicates the end of the gradient. This is also aliased to colors. This cannot be used with colour.

  • colour (Union[Colour, int]) – The primary colour of the role. This is also aliased to color. This cannot be used with colours.

  • displayed_separately (bool) – Whether the role should be separated in the member list. Defaults to False. This is also aliased to hoist.

  • self_assignable (bool) – Whether members should be allowed to assign the role to themselves. Defaults to False.

  • mentionable (bool) – Whether all members should be able to mention the role. Defaults to False.

Raises
  • Forbidden – You do not have permissions to update the role.

  • HTTPException – Updating the role failed.

  • TypeError – Cannot provide both colours and colour or displayed_separately and hoist.

Returns

The newly updated role.

Return type

Role

await delete()

This function is a coroutine.

Delete the role.

New in version 1.9.

Raises
Returns

The deleted role.

Return type

Role

SchedulingChannel

class guilded.SchedulingChannel

Represents a scheduling channel in a Server.

property availabilities

The list of availabilities in this channel.

Type

List[Availability]

get_availability(id)

Optional[Availability]: Get an availability in this channel.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

Server

class guilded.Server

Represents a server (or “guild”) in Guilded.

There is an alias for this class called Guild.

x == y

Checks if two servers are equal.

x != y

Checks if two servers are not equal.

hash(x)

Returns the server’s hash.

str(x)

Returns the server’s name.

id

The server’s id.

Type

str

name

The server’s name.

Type

str

type

The type of server. This correlates to one of the options in the server settings page under “Server type”.

Type

Optional[ServerType]

owner_id

The server’s owner’s id.

Type

str

created_at

When the server was created.

Type

datetime.datetime

about

The server’s description.

Type

str

avatar

The server’s set avatar, if any.

Type

Optional[Asset]

banner

The server’s banner, if any.

Type

Optional[Asset]

slug

The server’s URL slug (or “vanity code”). Referred to as a “Server URL” in the client. For a complete URL, see vanity_url.

Type

Optional[str]

verified

Whether the server is verified.

Type

bool

property description

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of about.

The server’s description.

Type

str

property vanity_url

The server’s vanity URL, if available.

Type

Optional[str]

property timezone

The server’s timezone.

If you are using Python 3.9 or greater, this is an instance of ZoneInfo. Otherwise, if pytz is available in the working environment, an instance from pytz. If neither apply or the server does not have a timezone set, this will be None.

Type

Optional[datetime.tzinfo]

property member_count

The server’s count of all members. If this is 0, the member cache is empty. It can be populated with fill_members().

Type

int

property user_member_count

The server’s count of non-bot members. If it is above 1000, this may be an outdated number, provided by Guilded. Otherwise, it should be a precise figure given the data available.

New in version 1.12.

Type

int

property owner

The server’s owner, if they are cached.

Type

Optional[Member]

property me

The client’s member object in the server.

Type

Optional[Member]

property members

The list of members in the server.

Type

List[Member]

property channels

The list of channels in the server.

Type

List[ServerChannel]

property threads

The list of threads in the server.

Type

List[Thread]

property announcement_channels

The list of announcement channels in the server.

Type

List[AnnouncementChannel]

property chat_channels

The list of chat channels in the server.

Type

List[ChatChannel]

property docs_channels

The list of docs channels in the server.

Type

List[DocsChannel]

property forum_channels

The list of forum channels in the server.

Type

List[ForumChannel]

property forums

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of forum_channels.

The list of forum channels in the server.

Type

List[ForumChannel]

property media_channels

The list of media channels in the server.

Type

List[MediaChannel]

property list_channels

The list of list channels in the server.

Type

List[ListChannel]

property scheduling_channels

The list of scheduling channels in the server.

Type

List[SchedulingChannel]

property text_channels

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of chat_channels.

The list of chat channels in the server.

Type

List[ChatChannel]

property voice_channels

The list of voice channels in the server.

Type

List[VoiceChannel]

property groups

The cached list of groups in the server.

Type

List[Group]

property emotes

The cached list of emotes in the server.

Type

List[Emote]

property roles

The cached list of roles in the server.

Type

List[Role]

property base_role

The base Member role for the server.

Type

Optional[Role]

property icon

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of avatar.

The server’s set avatar, if any.

Type

Optional[Asset]

property default_channel

The default channel of the server.

It may be preferable to use fetch_default_channel() instead of this property, as it relies solely on cache which may not be present for newly joined servers.

Type

Optional[ServerChannel]

get_member(member_id, /)

Optional[Member]: Get a member by their ID from the cache.

get_group(group_id, /)

Optional[Group]: Get a group by its ID from the cache.

get_category(category_id, /)

Optional[Category]: Get a category by its ID from the cache.

get_channel(channel_id, /)

Optional[ServerChannel]: Get a channel by its ID from the cache.

get_thread(thread_id, /)

Optional[Thread]: Get a thread by its ID from the cache.

get_channel_or_thread(id)

Optional[Union[ServerChannel, Thread]]: Get a channel or thread by its ID from the cache.

get_emote(emote_id, /)

Optional[Emote]: Get an emote by its ID from the cache.

get_role(role_id, /)

Optional[Role]: Get a role by its ID from the cache.

await leave()

This function is a coroutine.

Leave the server.

await create_category(name, *, group=None)

This function is a coroutine.

Create a new category in the server.

New in version 1.11.

Parameters
  • name (str) – The category’s name.

  • group (Optional[Group]) – The Group to create the category in. If not provided, defaults to the base group.

Returns

The created category.

Return type

Category

await create_category_channel(name, *, group=None)

This function is a coroutine.

Create a new category in the server.

New in version 1.11.

Parameters
  • name (str) – The category’s name.

  • group (Optional[Group]) – The Group to create the category in. If not provided, defaults to the base group.

Returns

The created category.

Return type

Category

await create_announcement_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new announcement channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

AnnouncementChannel

await create_chat_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new chat channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

ChatChannel

await create_text_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

This exists for compatibility with discord.py bots. It may be removed in a later version.

Create a new chat channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

ChatChannel

await create_docs_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new docs channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

DocsChannel

await create_forum_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new forum channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

ForumChannel

await create_forum(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

This exists for compatibility with discord.py bots. It may be removed in a later version.

Create a new forum channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

ForumChannel

await create_media_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new media channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

MediaChannel

await create_list_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new list channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

ListChannel

await create_scheduling_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new scheduling channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

SchedulingChannel

await create_voice_channel(name, *, topic=None, visibility=None, public=None, category=None, group=None)

This function is a coroutine.

Create a new voice channel in the server.

Parameters
  • name (str) – The channel’s name. Can include spaces.

  • topic (str) – The channel’s topic.

  • category (Category) – The Category to create this channel under. If not provided, it will be shown under the “Channels” header in the client (no category).

  • visibility (ChannelVisibility) –

    What users can access the channel. Currently, this can only be public or None.

    New in version 1.10.

  • public (bool) –

    Whether this channel and its contents should be visible to people who aren’t part of the server. Defaults to False.

    Deprecated since version 1.10: Use visibility instead.

  • group (Group) – The Group to create this channel in. If not provided, defaults to the base group.

Returns

The created channel.

Return type

VoiceChannel

await fetch_category(category_id, /)

This function is a coroutine.

Fetch a category.

New in version 1.11.

Returns

The category from the ID.

Return type

Category

Raises
  • HTTPException – Retrieving the category failed.

  • NotFound – The category to fetch does not exist.

  • Forbidden – You do not have permission to fetch this category.

await fetch_channel(channel_id, /)

This function is a coroutine.

Fetch a channel.

This method is an API call. For general usage, consider get_channel() instead.

Returns

The channel from the ID.

Return type

ServerChannel

Raises
  • InvalidData – The target channel does not belong to the current server.

  • HTTPException – Retrieving the channel failed.

  • NotFound – The channel to fetch does not exist.

  • Forbidden – You do not have permission to fetch this channel.

await fetch_members()

This function is a coroutine.

Fetch the list of Members in the server.

Returns

The members in the server.

Return type

List[Member]

await fetch_member(user_id, /)

This function is a coroutine.

Fetch a specific Member in this server.

Parameters

id (str) – The member’s ID to fetch.

Returns

The member from their ID.

Return type

Member

Raises

NotFound – A member with that ID does not exist in this server.

await fill_members()

Fill the member cache for this server.

Note

This is used internally and is generally not needed for most applications as member cache is created and discarded automatically throughout a connected client’s lifetime.

This method could be seen as analogous to guild chunking, except that it uses HTTP and not the gateway.

await bulk_award_member_xp(amount, *members)

This function is a coroutine.

Bulk award XP to multiple members.

Note

This method modifies the current values. To bulk set total XP, use bulk_set_member_xp().

New in version 1.11.

Parameters
  • amount (int) – The amount of XP to award. Could be a negative value to remove XP.

  • members (Tuple[Member]) – The members to award XP to.

Returns

A mapping of member ID to the total amount of XP they have after the operation.

Return type

dict

await bulk_set_member_xp(total, *members)

This function is a coroutine.

Bulk set multiple members’ total XP.

Note

This method replaces the current values. To add or subtract XP, use bulk_award_member_xp().

New in version 1.11.

Parameters
  • total (int) – The total amount of XP each member should have.

  • members (Tuple[Member]) – The members to set XP for.

Returns

A mapping of member ID to the total amount of XP they have after the operation.

Return type

dict

await create_role(*, name=..., permissions=..., colours=..., colors=..., colour=..., color=..., displayed_separately=..., hoist=..., self_assignable=..., mentionable=...)

This function is a coroutine.

Create a role in the server.

All parameters are optional.

New in version 1.9.

Parameters
  • name (str) – The name of the role. Defaults to ‘New role’.

  • permissions (Permissions) – The permissions for the role.

  • colours (List[Union[Colour, int]]) – The colour(s) of the role. If there are two values, the second indicates the end of the gradient. This is also aliased to colors. This cannot be used with colour.

  • colour (Union[Colour, int]) – The primary colour of the role. This is also aliased to color. This cannot be used with colours.

  • displayed_separately (bool) – Whether the role should be separated in the member list. Defaults to False. This is also aliased to hoist.

  • self_assignable (bool) – Whether members should be allowed to assign the role to themselves. Defaults to False.

  • mentionable (bool) – Whether all members should be able to mention the role. Defaults to False.

Raises
  • Forbidden – You do not have permissions to create a role.

  • HTTPException – Creating the role failed.

  • TypeError – Cannot provide both colours and colour or displayed_separately and hoist.

Returns

The created role.

Return type

Role

await fetch_roles()

This function is a coroutine.

Fetch the list of Roles in the server.

New in version 1.9.

Returns

The roles in the server.

Return type

List[Role]

await fetch_role(role_id, /)

This function is a coroutine.

Fetch a specific Role in this server.

New in version 1.9.

Parameters

id (int) – The role’s ID to fetch.

Returns

The role from the ID.

Return type

Role

Raises

NotFound – A role with that ID does not exist in this server.

await fill_roles()

Fill the role cache for this server.

New in version 1.9.

await ban(user, *, reason=None)

This function is a coroutine.

Ban a user from the server.

Parameters

user (abc.User) – The user to ban.

Returns

The ban that was created.

Return type

MemberBan

await unban(user)

This function is a coroutine.

Unban a user from the server.

Parameters

user (abc.User) – The user to unban.

await fetch_ban(user)

This function is a coroutine.

Fetch a user’s ban.

New in version 1.10.

Returns

The ban for the user.

Return type

MemberBan

await bans()

This function is a coroutine.

Get all bans that have been created in the server.

Returns

The list of bans in the server.

Return type

List[MemberBan]

await kick(user)

This function is a coroutine.

Kick a user from the server.

Parameters

user (abc.User) – The user to kick.

await create_webhook(name, *, channel)

This function is a coroutine.

Create a webhook in a channel.

Parameters
Raises
  • HTTPException – Creating the webhook failed.

  • Forbidden – You do not have permissions to create a webhook.

Returns

The created webhook.

Return type

Webhook

await fetch_webhook(webhook_id, /)

This function is a coroutine.

Fetch a webhook in this server.

New in version 1.4.

Returns

The webhook by its ID.

Return type

Webhook

Raises

Forbidden – You do not have permission to get webhooks in this channel.

await webhooks(*, channel=None)

This function is a coroutine.

Fetch the list of webhooks in this server.

Changed in version 1.12.1: No longer relies on channel cache when channel is not provided.

Parameters

channel (Optional[Union[ChatChannel, ListChannel]]) – The channel to fetch webhooks from.

Returns

The webhooks in this server or, if specified, the channel.

Return type

List[Webhook]

Raises

Forbidden – You do not have permission to get webhooks in this channel.

await fetch_default_channel()

This function is a coroutine.

Fetch the default channel in this server.

Returns

The default channel.

Return type

ServerChannel

Raises

ValueError – This server has no default channel.

await create_group(name, *, description=..., emote=..., public=...)

This function is a coroutine.

Create a group in the server.

Parameters
  • name (str) – The name of the group.

  • description (Optional[str]) – The description of the group.

  • emote (Optional[Emote]) – The emote associated with the group.

  • public (Optional[bool]) – Whether the group is public.

Raises
Returns

The created group.

Return type

Group

await fetch_group(group_id, /)

This function is a coroutine.

Fetch a group in the server.

Raises
Returns

The group by the ID.

Return type

Group

await fetch_groups()

This function is a coroutine.

Fetch all groups in the server.

Raises
  • HTTPException – Fetching the groups failed.

  • Forbidden – You do not have permissions to fetch the groups.

Returns

The groups in the server.

Return type

List[Group]

await fetch_subscription_tier(tier_type, /)

This function is a coroutine.

Fetch a subscription tier in the server.

New in version 1.9.

Parameters

tier_type (ServerSubscriptionTierType) – The type of the tier to fetch.

Raises
  • NotFound – The server has no tier with the provided type.

  • HTTPException – Fetching the tier failed.

Returns

The subscription tier by the type.

Return type

ServerSubscriptionTier

await fetch_subscription_tiers()

This function is a coroutine.

Fetch all subscription tiers in the server.

New in version 1.9.

Raises

HTTPException – Fetching the tiers failed.

Returns

The subscription tiers in the server.

Return type

List[ServerSubscriptionTier]

ServerSubscriptionTier

class guilded.ServerSubscriptionTier

Represents a subscription tier in a server.

x == y

Checks if two tiers are equal.

x != y

Checks if two tiers are not equal.

New in version 1.9.

type

The type of the tier.

Type

ServerSubscriptionTierType

server_id

The ID of the server that the tier is in.

Type

str

role_id

The ID of the role that the tier is linked to.

Type

Optional[int]

description

The description of the tier.

Type

Optional[str]

cost

The cost of the tier in USD cents per month.

Type

int

created_at

When the tier was created.

Type

datetime.datetime

property server

The server that the subscription tier is in.

Type

Optional[Server]

property role

The role that the subscription tier is linked to.

Type

Optional[Role]

StreamChannel

class guilded.StreamChannel

Represents a stream channel in a Server.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

Thread

class guilded.Thread

Represents a thread in a Server.

parent_id

The ID of the immediately next higher channel or thread in the thread chain.

Type

str

root_id

The ID of the topmost channel in the thread chain.

New in version 1.9.

Type

str

starter_message_id

The ID of the message that the thread was created from, if any.

New in version 1.9.

Type

Optional[str]

property root

Optional[ChatChannel | VoiceChannel | StreamChannel]: The topmost channel in the thread chain

New in version 1.9.

property parent

Optional[ChatChannel | VoiceChannel | StreamChannel | Thread]: The parent channel or thread that the thread belongs to

property starter_message

The starter message in the thread, if it exists and is cached.

New in version 1.9.

Type

Optional[ChatMessage]

await fetch_starter_message()

This function is a coroutine.

Fetch the starter message in this thread. Sometimes this may be available via starter_message, but it is unlikely when dealing with existing threads because it relies on message cache.

This is roughly equivalent to:

initial_message = await thread.fetch_message(thread.starter_message_id)

New in version 1.9.

Returns

The initial message in the thread, if any.

Return type

Optional[ChatMessage]

Raises

NotFound – The starter message was deleted.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

User

class guilded.User

Represents a user in Guilded.

x == y

Checks if two users are equal.

x != y

Checks if two users are not equal.

hash(x)

Returns the user’s hash.

str(x)

Returns the user’s name.

property bot

This exists for compatibility with discord.py bots. It may be removed in a later version.

Whether the user is a bot account or webhook.

Type

bool

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

property display_avatar

The “top-most” avatar for this user, or, the avatar that the client will display in the member list and in chat.

Type

Asset

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

property mention

The mention string for this user.

This will render and deliver a mention when sent in an Embed.

Type

str

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

VoiceChannel

class guilded.VoiceChannel

Represents a voice channel in a Server.

await archive()

This function is a coroutine.

Archive this channel.

New in version 1.10.

property category

The category that this channel is in, if any.

Type

Optional[Category]

await create_role_override(role, override)

This function is a coroutine.

Create a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to create an override for.

  • override (PermissionOverride) – The override values to use.

Returns

The created role override.

Return type

ChannelRoleOverride

await create_thread(name, *, message=None, visibility=None)

This function is a coroutine.

Create a new thread in the channel.

Warning

Be careful with this method! It is very easy to accidentally cause a loop if you create a thread on a message that caused the creation of its thread.

Depending on the type of the parent channel, this method requires different permissions:

Parent Type

Permission

chat

Permissions.read_messages

voice

Permissions.hear_voice

stream

Permissions.view_streams

New in version 1.9.

Parameters
  • name (str) – The thread’s name. Can include spaces.

  • message (Optional[ChatMessage]) – The message to create the thread with. If a private message is passed (i.e. ChatMessage.private is True), then the thread is private too.

  • visibility (Optional[ChannelVisibility]) –

    What users can access the channel. Currently, this can only be private or None.

    New in version 1.10.

Returns

The created thread.

Return type

Thread

Raises
  • NotFound – The server, channel, or message provided does not exist.

  • Forbidden – You are not allowed to create a thread in this channel.

  • HTTPException – Failed to create a thread.

await create_user_override(user, override)

This function is a coroutine.

Create a user-based permission override in this channel.

New in version 1.11.

Parameters
Returns

The created role override.

Return type

ChannelUserOverride

await delete()

This function is a coroutine.

Delete this channel.

await delete_role_override(role)

This function is a coroutine.

Delete a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to delete.

await delete_user_override(user)

This function is a coroutine.

Delete a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to delete.

await edit(*, name=..., topic=..., visibility=..., public=None)

This function is a coroutine.

Edit this channel.

All parameters are optional.

Parameters
  • name (str) – The channel’s name.

  • topic (str) – The channel’s topic. Not applicable to threads.

  • visibility (ChannelVisibility) – What users can access the channel. A channel cannot currently be manually set to private. Could be None to reset the visibility.

  • public (bool) –

    Whether the channel should be public, i.e., visible to users who are not a member of the server. Not applicable to threads.

    Deprecated since version 1.10: Use visibility instead.

Returns

The newly edited channel.

Return type

ServerChannel

await fetch_message(message_id, /)

This function is a coroutine.

Fetch a message.

Returns

The message from the ID.

Return type

ChatMessage

await fetch_role_override(role)

This function is a coroutine.

Fetch a role-based permission override in this channel.

New in version 1.11.

Parameters

role (Role) – The role whose override to fetch.

Returns

The role override.

Return type

ChannelRoleOverride

await fetch_role_overrides()

This function is a coroutine.

Fetch all role-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelRoleOverride]

await fetch_user_override(user)

This function is a coroutine.

Fetch a user-based permission override in this channel.

New in version 1.11.

Parameters

user (Member) – The member whose override to fetch.

Returns

The role override.

Return type

ChannelUserOverride

await fetch_user_overrides()

This function is a coroutine.

Fetch all user-based permission overrides in this channel.

New in version 1.11.

Returns

The role overrides.

Return type

List[ChannelUserOverride]

property group

The group that this channel is in.

Type

Optional[Group]

property guild

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of server.

The server that this channel is in.

Type

Server

await history(*, before=None, after=None, limit=50, include_private=False)

This function is a coroutine.

Fetch the message history of this channel.

All parameters are optional.

Parameters
  • before (datetime.datetime) – Fetch messages sent before this timestamp.

  • after (datetime.datetime) – Fetch messages sent after this timestamp.

  • limit (int) – The maximum number of messages to fetch. Defaults to 50.

  • include_private (bool) – Whether to include private messages in the response. Defaults to False. If the client is a user account, this has no effect and is always True.

Return type

List[ChatMessage]

is_nsfw()

bool: This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns False.

New in version 1.11.

property jump_url

The share URL of the channel.

Type

str

property public

Whether the channel is visible to everyone, including members who are not part of the server.

Deprecated since version 1.10: Use visibility instead.

Type

bool

await restore()

This function is a coroutine.

Restore this channel from its archived state.

New in version 1.10.

await send(content=..., *, embed=..., embeds=..., reference=..., reply_to=..., mention_author=None, silent=None, private=False, delete_after=None, hide_preview_urls=...)

This function is a coroutine.

Send a message to a Guilded channel.

Warning

Replying with both silent and private set to True (a private reply with no mention) will not send the reply to the author of the message(s) until they refresh the channel. This is a Guilded bug.

Parameters
  • content (str) – The text content to send with the message.

  • embed (Embed) – An embed to send with the message. This parameter cannot be meaningfully combined with embeds.

  • embeds (List[Embed]) – A list of embeds to send with the message. This can contain at most 1 value. This parameter cannot be meaningfully combined with embed.

  • reply_to (List[ChatMessage]) – A list of up to 5 messages to reply to.

  • silent (bool) – Whether this message should not mention the members mentioned in it, including the authors of messages it is in reply to, if any. Defaults to False.

  • private (bool) – Whether this message should only be visible to its author (the bot) and the authors of the messages it is replying to. Defaults to False. You should not include sensitive data in these because private replies can still be visible to server moderators.

  • delete_after (float) – If provided, the number of seconds to wait in the background before deleting the sent message. If the deletion fails, then it is silently ignored.

  • hide_preview_urls (List[str]) – URLs in content to prevent unfurling as a link preview when displaying in Guilded.

property server

The server that this channel is in.

Type

Server

property share_url

The share URL of the channel.

Type

str

await update_role_override(role, override)

This function is a coroutine.

Update a role-based permission override in this channel.

New in version 1.11.

Parameters
  • role (Role) – The role to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelRoleOverride

await update_user_override(user, override)

This function is a coroutine.

Update a user-based permission override in this channel.

New in version 1.11.

Parameters
  • user (Member) – The member to update an override for.

  • override (PermissionOverride) – The new override values to use.

Returns

The updated role override.

Return type

ChannelUserOverride

Data Classes

Below are some classes that primarily just wrap data. You are able to create most of these yourself.

ChannelRoleOverride

class guilded.ChannelRoleOverride

Represents a role-based permission override in a channel.

New in version 1.11.

role

The role whose permissions are to be overridden.

Type

Optional[Role]

role_id

The ID of the role.

Type

int

override

The permission values overridden for the role.

Type

PermissionOverride

channel

The channel that the override is in.

Type

Optional[abc.ServerChannel]

channel_id

The ID of the channel.

Type

str

created_at

When the override was created.

Type

datetime.datetime

updated_at

When the override was last updated.

Type

Optional[datetime.datetime]

ChannelUserOverride

class guilded.ChannelUserOverride

Represents a user-based permission override in a channel.

New in version 1.11.

user

The user whose permissions are to be overridden.

Type

Optional[Member]

user_id

The ID of the user.

Type

str

override

The permission values overridden for the user.

Type

PermissionOverride

channel

The channel that the override is in.

Type

Optional[abc.ServerChannel]

channel_id

The ID of the channel.

Type

str

created_at

When the override was created.

Type

datetime.datetime

updated_at

When the override was last updated.

Type

Optional[datetime.datetime]

CategoryRoleOverride

class guilded.CategoryRoleOverride

Represents a role-based permission override in a category.

New in version 1.11.

role

The role whose permissions are to be overridden.

Type

Optional[Role]

role_id

The ID of the role.

Type

int

override

The permission values overridden for the role.

Type

PermissionOverride

category

The category that the override is in.

Type

Optional[Category]

category_id

The ID of the category.

Type

int

created_at

When the override was created.

Type

datetime.datetime

updated_at

When the override was last updated.

Type

Optional[datetime.datetime]

CategoryUserOverride

class guilded.CategoryUserOverride

Represents a user-based permission override in a category.

New in version 1.11.

user

The user whose permissions are to be overridden.

Type

Optional[Member]

user_id

The ID of the user.

Type

str

override

The permission values overridden for the user.

Type

PermissionOverride

category

The category that the override is in.

Type

Optional[Category]

category_id

The ID of the category.

Type

int

created_at

When the override was created.

Type

datetime.datetime

updated_at

When the override was last updated.

Type

Optional[datetime.datetime]

ClientFeatures

class guilded.ClientFeatures

Opt-in or out of Guilded or guilded.py features.

All parameters are optional.

Parameters
  • experimental_event_style (bool) – Enables a more simplified event handling interface. Read more about this here.

  • official_markdown (bool) – Enables new (2024) markdown support for requests made by the client as well as events received.

Embed

class guilded.Embed

Represents a Guilded chat embed.

len(x)

Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.

Certain properties return an EmbedProxy, a type that acts similar to a regular dict except using dotted access, e.g. embed.author.icon_url. If the attribute is invalid or empty, then a special sentinel value is returned, Embed.Empty.

URL parameters (both as text and for images) accept any string, even those that are not a valid URI.

For ease of use, all parameters that expect a str are implicitly casted to str for you.

title

The title of the embed. This can be set during initialisation.

Type

str

description

The description of the embed. This can be set during initialisation.

Type

str

url

The URL of the embed. This can be set during initialisation.

Type

str

timestamp

The timestamp of the embed content. This could be a naive or aware datetime.

Type

datetime.datetime

colour

The colour code of the embed. Aliased to color as well. This can be set during initialisation.

Type

Union[Colour, int]

Empty

A special sentinel value used by EmbedProxy and this class to denote that the value or attribute is empty.

classmethod from_dict(data)

Converts a dict to a Embed, provided it is in the format that Guilded expects it to be in.

This format is identical to Discord’s format.

Parameters

data (dict) – The dictionary to convert into an embed.

copy()

Returns a shallow copy of the embed.

property footer

Returns an EmbedProxy denoting the footer contents. See set_footer() for possible values you can access. If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

Sets the footer for the embed content. This function returns the class instance to allow for fluent-style chaining.

Parameters
  • text (str) – The footer text.

  • icon_url (str) – The URL of the footer icon.

property image

Returns an EmbedProxy denoting the image contents. Possible attributes you can access are:

  • url

  • proxy_url

  • width

  • height

If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

set_image(*, url)

Sets the image for the embed content. This function returns the class instance to allow for fluent-style chaining.

Parameters

url (str) – The source URL for the image.

property thumbnail

Returns an EmbedProxy denoting the thumbnail contents. Possible attributes you can access are:

  • url

  • proxy_url

  • width

  • height

If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

set_thumbnail(*, url)

Sets the thumbnail for the embed content. This function returns the class instance to allow for fluent-style chaining.

Parameters

url (str) – The source URL for the thumbnail.

property video

Returns an EmbedProxy denoting the video contents. Possible attributes include:

  • url for the video URL.

  • height for the video height.

  • width for the video width.

If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

property provider

Returns an EmbedProxy denoting the provider contents. The only attributes that might be accessed are name and url. If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

property author

Returns an EmbedProxy denoting the author contents. See set_author() for possible values you can access. If the attribute has no value then Empty is returned.

Type

Union[EmbedProxy, Empty]

set_author(*, name, url=Embed.Empty, icon_url=Embed.Empty)

Sets the author for the embed content. This function returns the class instance to allow for fluent-style chaining.

Parameters
  • name (str) – The name of the author.

  • url (str) – The URL for the author.

  • icon_url (str) – The URL of the author icon.

remove_author()

Clears embed’s author information. This function returns the class instance to allow for fluent-style chaining.

property fields

Returns a list of EmbedProxy denoting the field contents. See add_field() for possible values you can access. If the attribute has no value then Empty is returned.

Type

Union[List[EmbedProxy], Empty]

add_field(*, name, value, inline=True)

Adds a field to the embed object. This function returns the class instance to allow for fluent-style chaining.

Parameters
  • name (str) – The name of the field.

  • value (str) – The value of the field.

  • inline (bool) – Whether the field should be displayed inline.

insert_field_at(index, *, name, value, inline=True)

Inserts a field before a specified index to the embed. This function returns the class instance to allow for fluent-style chaining.

Parameters
  • index (int) – The index of where to insert the field.

  • name (str) – The name of the field.

  • value (str) – The value of the field.

  • inline (bool) – Whether the field should be displayed inline.

clear_fields()

Removes all fields from this embed.

remove_field(index)

Removes a field at a specified index. If the index is invalid or out of bounds then the error is silently swallowed.

Note

When deleting a field by index, the index of the other fields shift to fill the gap just like a regular list.

Parameters

index (int) – The index of the field to remove.

set_field_at(index, *, name, value, inline=True)

Modifies a field to the embed object. The index must point to a valid pre-existing field. This function returns the class instance to allow for fluent-style chaining.

Parameters
  • index (int) – The index of the field to modify.

  • name (str) – The name of the field.

  • value (str) – The value of the field.

  • inline (bool) – Whether the field should be displayed inline.

Raises

IndexError – An invalid index was provided.

to_dict()

Converts this embed object into a dict.

The resulting format is identical to Discord’s format.

Colour

class guilded.Colour

Represents a colour in Guilded, such as in embeds or roles. This class is similar to a (red, green, blue) tuple.

There is an alias for this class called Color.

x == y

Checks if two colours are equal.

x != y

Checks if two colours are not equal.

hash(x)

Return the colour’s hash.

str(x)

Returns the hex format for the colour.

value

The raw integer colour value.

Type

int

property r

Returns the red component of the colour.

Type

int

property g

Returns the green component of the colour.

Type

int

property b

Returns the blue component of the colour.

Type

int

to_rgb()

Tuple[int, int, int]: Returns an (r, g, b) tuple representing the colour.

classmethod from_rgb(r, g, b)

Constructs a Colour from an RGB tuple.

classmethod from_hsv(h, s, v)

Constructs a Colour from an HSV tuple.

classmethod from_str(value)

Constructs a Colour from a string.

The following formats are accepted:

  • 0x<hex>

  • #<hex>

  • 0x#<hex>

  • rgb(<number>, <number>, <number>)

Like CSS, <number> can be either 0-255 or 0-100% and <hex> can be either a 6 digit hex number or a 3 digit hex shortcut (e.g. #fff).

Raises

ValueError – The string could not be converted into a colour.

classmethod default()

A factory method that returns a Colour with a value of 0.

classmethod random(*, seed=None)

A factory method that returns a Colour with a random hue.

Note

The random algorithm works by choosing a colour with a random hue but with maxed out saturation and value.

Parameters

seed (Optional[Union[int, str, float, bytes, bytearray]]) – The seed to initialize the RNG with. If None is passed the default RNG is used.

classmethod teal()

A factory method that returns a Colour with a value of 0x1abc9c.

classmethod dark_teal()

A factory method that returns a Colour with a value of 0x11806a.

classmethod green()

A factory method that returns a Colour with a value of 0x2ecc71.

classmethod dark_green()

A factory method that returns a Colour with a value of 0x1f8b4c.

classmethod blue()

A factory method that returns a Colour with a value of 0x3498db.

classmethod dark_blue()

A factory method that returns a Colour with a value of 0x206694.

classmethod purple()

A factory method that returns a Colour with a value of 0x9b59b6.

classmethod dark_purple()

A factory method that returns a Colour with a value of 0x71368a.

classmethod magenta()

A factory method that returns a Colour with a value of 0xe91e63.

classmethod dark_magenta()

A factory method that returns a Colour with a value of 0xad1457.

classmethod gold()

A factory method that returns a Colour with a value of 0xf1c40f.

classmethod dark_gold()

A factory method that returns a Colour with a value of 0xc27c0e.

classmethod orange()

A factory method that returns a Colour with a value of 0xe67e22.

classmethod dark_orange()

A factory method that returns a Colour with a value of 0xa84300.

classmethod red()

A factory method that returns a Colour with a value of 0xe74c3c.

classmethod dark_red()

A factory method that returns a Colour with a value of 0x992d22.

classmethod lighter_grey()

A factory method that returns a Colour with a value of 0x95a5a6.

classmethod lighter_gray()

A factory method that returns a Colour with a value of 0x95a5a6.

classmethod dark_grey()

A factory method that returns a Colour with a value of 0x607d8b.

classmethod dark_gray()

A factory method that returns a Colour with a value of 0x607d8b.

classmethod light_grey()

A factory method that returns a Colour with a value of 0x979c9f.

classmethod light_gray()

A factory method that returns a Colour with a value of 0x979c9f.

classmethod darker_grey()

A factory method that returns a Colour with a value of 0x546e7a.

classmethod darker_gray()

A factory method that returns a Colour with a value of 0x546e7a.

classmethod gilded()

A factory method that returns a Colour with a value of 0xf5c400.

classmethod greyple()

A factory method that returns a Colour with a value of 0x99aab5.

classmethod dark_theme()

A factory method that returns a Colour with a value of 0x373943. This will appear transparent in chat.

classmethod dark_theme_embed()

A factory method that returns a Colour with a value of 0x32343d. This will appear to blend with embed backgrounds.

classmethod black()

A factory method that returns a Colour with a value of 0x111820.

classmethod grey()

A factory method that returns a Colour with a value of 0x36363D.

classmethod gray()

A factory method that returns a Colour with a value of 0x36363D.

Object

class guilded.Object

Represents a generic Guilded object.

This class is especially useful when interfacing with the early access bot API, in which often only an object’s ID is available.

Warning

Because Guilded IDs are not meaningful in the way that snowflakes are, a creation date is impossible to attain from only an ID. As a result, created_at will always return 1/1/2016 for backwards compatibility with applications that implement discord.Object.created_at.

x == y

Checks if two objects are equal.

x != y

Checks if two objects are not equal.

hash(x)

Returns the object’s hash.

id

The ID of the object.

Type

Union[str, int]

created_at

This exists for compatibility with discord.py bots. It may be removed in a later version.

Always returns 1/1/2016.

Type

datetime.datetime

Permissions

class guilded.Permissions

Wraps up permission values in Guilded.

An instance of this class is constructed by providing a list of permission values:

# A `Permissions` instance representing the ability
# to read and send messages.
guilded.Permissions('CanReadChats', 'CanCreateChats')
x == y

Checks if two permissions are equal.

x != y

Checks if two permissions are not equal.

values

The raw array of permission values. This list is not guaranteed to be in any particular order. You should use the properties available on this class instead of this attribute.

Type

List[str]

classmethod all()

A factory method that creates a Permissions with all permissions set to True.

classmethod none()

A factory method that creates a Permissions with all permissions set to False.

classmethod general()

A factory method that creates a Permissions with all “General” permissions set to True.

classmethod recruitment()

A factory method that creates a Permissions with all “Recruitment” permissions set to True.

classmethod announcements()

A factory method that creates a Permissions with all “Announcement” permissions set to True.

classmethod chat()

A factory method that creates a Permissions with all “Chat” permissions set to True.

classmethod calendar()

A factory method that creates a Permissions with all “Calendar” permissions set to True.

classmethod forums()

A factory method that creates a Permissions with all “Forum” permissions set to True.

classmethod docs()

A factory method that creates a Permissions with all “Docs” permissions set to True.

classmethod media()

A factory method that creates a Permissions with all “Media” permissions set to True.

classmethod voice()

A factory method that creates a Permissions with all “Voice” permissions set to True.

classmethod competitive()

A factory method that creates a Permissions with all “Competitive” permissions set to True.

classmethod customization()

A factory method that creates a Permissions with all “Customization” permissions set to True.

classmethod customisation()

A factory method that creates a Permissions with all “Customization” permissions set to True.

classmethod forms()

A factory method that creates a Permissions with all “Forms” permissions set to True.

classmethod lists()

A factory method that creates a Permissions with all “List” permissions set to True.

classmethod brackets()

A factory method that creates a Permissions with all “Bracket” permissions set to True.

classmethod scheduling()

A factory method that creates a Permissions with all “Scheduling” permissions set to True.

classmethod bots()

A factory method that creates a Permissions with all “Bot” permissions set to True.

classmethod xp()

A factory method that creates a Permissions with all “XP” permissions set to True.

classmethod streams()

A factory method that creates a Permissions with all “Stream” permissions set to True.

classmethod socket_events()

A factory method that creates a Permissions with all “Socket event” permissions set to True.

property administrator

Returns True if a user has every permission.

This is a pseudo-permission, i.e., there is no real “administrator” permission, and thus this property being True does not necessarily mean that a user will have all the same abilities as a Discord user with the administrator permission.

Type

bool

property update_server

Returns True if a user can update the server’s settings.

Type

bool

property manage_server

This is an alias of update_server.

Type

bool

property manage_guild

This is an alias of update_server.

Type

bool

property manage_roles

Returns True if a user can update the server’s roles.

Type

bool

property invite_members

Returns True if a user can directly invite members to the server.

Type

bool

property create_instant_invite

This is an alias of invite_members.

Type

bool

property kick_members

Returns True if a user can kick or ban members from the server.

Type

bool

property ban_members

This is an alias of kick_members.

Type

bool

property manage_groups

Returns True if a user can create, edit, or delete groups.

Type

bool

property manage_channels

Returns True if a user can create, edit, or delete channels.

Type

bool

property manage_webhooks

Returns True if a user can create, edit, or delete webhooks.

Type

bool

property mention_everyone

Returns True if a user can use @everyone and @here mentions.

Type

bool

property moderator_view

Returns True if a user can access “moderator view” to see private replies.

Type

bool

property slowmode_exempt

Returns True if a user is exempt from slowmode restrictions.

Type

bool

property read_applications

Returns True if a user can view server and game applications.

Type

bool

property approve_applications

Returns True if a user can approve server and game applications.

Type

bool

property edit_application_form

Returns True if a user can edit server and game applications, and toggle accepting applications.

Type

bool

property indicate_lfm_interest

Returns True if a user can indicate interest in a player instead of an upvote.

Type

bool

property modify_lfm_status

Returns True if a user can modify the “Find Player” status for the server listing card.

Type

bool

property read_announcements

Returns True if a user can view announcements.

Type

bool

property create_announcements

Returns True if a user can create and delete announcements.

Type

bool

property manage_announcements

Returns True if a user can delete announcements by other members or pin any announcement.

Type

bool

property read_messages

Returns True if a user can read chat messages.

Type

bool

property view_channel

This is an alias of read_messages.

Type

bool

property send_messages

Returns True if a user can send chat messages.

Type

bool

property upload_media

Returns True if a user can upload images and videos to chat messages.

Type

bool

property create_threads

Returns True if a user can create threads.

Type

bool

property create_public_threads

This is an alias of create_threads.

Type

bool

property create_private_threads

This is an alias of create_threads.

Type

bool

property send_messages_in_threads

Returns True if a user can reply to threads.

Type

bool

property send_private_replies

Returns True if a user can privately reply to messages.

Type

bool

property manage_messages

Returns True if a user can delete messages by other members or pin any message.

Type

bool

property manage_threads

Returns True if a user can archive and restore threads.

Type

bool

property create_chat_forms

Returns True if a user can create forms.

Type

bool

property view_events

Returns True if a user can view calendar events.

Type

bool

property create_events

Returns True if a user can create calendar events.

Type

bool

property manage_events

Returns True if a user can update calendar events created by other members and move them to other channels.

Type

bool

property remove_events

Returns True if a user can remove calendar events created by other members.

Type

bool

property edit_rsvps

Returns True if a user can edit the RSVP status for members in a calendar event.

Type

bool

property read_forums

Returns True if a user can read forums.

Type

bool

property create_topics

Returns True if a user can create forum topics.

Type

bool

property create_topic_replies

Returns True if a user can create forum topic replies.

Type

bool

property manage_topics

Returns True if a user can remove forum topics and replies created by other members, or move them to other channels.

Type

bool

property sticky_topics

Returns True if a user can sticky forum topics.

Type

bool

property lock_topics

Returns True if a user can lock forum topics.

Type

bool

property view_docs

Returns True if a user can view docs.

Type

bool

property read_docs

This is an alias of view_docs.

Type

bool

property create_docs

Returns True if a user can create docs.

Type

bool

property manage_docs

Returns True if a user can update docs created by other members and move them to other channels.

Type

bool

property remove_docs

Returns True if a user can remove docs created by other members.

Type

bool

property see_media

Returns True if a user can see media.

Type

bool

property read_media

This is an alias of see_media.

Type

bool

property create_media

Returns True if a user can create media.

Type

bool

property manage_media

Returns True if a user can update media created by other members and move them to other channels.

Type

bool

property remove_media

Returns True if a user can remove media created by other members.

Type

bool

property hear_voice

Returns True if a user can listen to voice chat.

Type

bool

property add_voice

Returns True if a user can talk in voice chat.

Type

bool

property speak

This is an alias of add_voice.

Type

bool

property manage_voice_rooms

Returns True if a user can create, rename, and delete voice rooms.

Type

bool

property move_members

Returns True if a user can move members to other voice rooms.

Type

bool

property disconnect_members

Returns True if a user can disconnect members from voice or stream rooms.

Type

bool

property broadcast

Returns True if a user can broadcast their voice to voice rooms lower in the hierarchy when speaking in voice chat.

Type

bool

property whisper

Returns True if a user can direct their voice to specific members.

Type

bool

property priority_speaker

Returns True if a user can prioritize their voice when speaking in voice chat.

Type

bool

property use_voice_activity

Returns True if a user can use the voice activity input mode for voice chats.

Type

bool

property use_voice_activation

This is an alias of use_voice_activity.

Type

bool

property mute_members

Returns True if a user can mute members in voice chat.

Type

bool

property deafen_members

Returns True if a user can deafen members in voice chat.

Type

bool

property send_voice_messages

Returns True if a user can send chat messages to voice channels.

Type

bool

property create_scrims

Returns True if a user can create matchmaking scrims.

Type

bool

property create_tournaments

Returns True if a user can create and manage tournaments.

Type

bool

property manage_tournaments

This is an alias of create_tournaments.

Type

bool

property register_for_tournaments

Returns True if a user can register the server for tournaments.

Type

bool

property manage_emojis

Returns True if a user can create and manage server emojis.

Type

bool

property manage_emotes

This is an alias of manage_emojis

Type

bool

property change_nickname

Returns True if a user can change their own nickname.

Type

bool

property manage_nicknames

Returns True if a user can change the nicknames of other members.

Type

bool

property view_form_responses

Returns True if a user can view all form responses.

Type

bool

property view_poll_responses

Returns True if a user can view all poll results.

Type

bool

property view_poll_results

This is an alias of view_poll_responses.

Type

bool

property view_list_items

Returns True if a user can view list items.

Type

bool

property read_list_items

This is an alias of view_list_items.

Type

bool

property create_list_items

Returns True if a user can create list items.

Type

bool

property manage_list_items

Returns True if a user can update list items created by other members and move them to other channels.

Type

bool

property remove_list_items

Returns True if a user can remove list items created by other members.

Type

bool

property complete_list_items

Returns True if a user can complete list items created by other members.

Type

bool

property reorder_list_items

Returns True if a user can reorder list items.

Type

bool

property view_brackets

Returns True if a user can view tournament brackets.

Type

bool

property read_brackets

This is an alias of view_brackets.

Type

bool

property report_scores

Returns True if a user can report match scores on behalf of the server.

Type

bool

property view_schedules

Returns True if a user can view members’ schedules.

Type

bool

property read_schedules

This is an alias of view_schedules.

Type

bool

property create_schedules

Returns True if a user can let the server know their available schedule.

Type

bool

property remove_schedules

Returns True if a user can remove availabilities created by other members.

Type

bool

property manage_bots

Returns True if a user can create and edit flowbots.

Type

bool

property manage_server_xp

Returns True if a user can manage XP for members.

Type

bool

property view_streams

Returns True if a user can view streams.

Type

bool

property join_stream_voice

Returns True if a user can listen in stream channels.

Type

bool

property add_stream

Returns True if a user can stream as well as speak in stream channels.

Type

bool

property stream

This is an alias of add_stream.

Type

bool

property send_stream_messages

Returns True if a user can send messages in stream channels.

Type

bool

property add_stream_voice

Returns True if a user can speak in stream channels.

Type

bool

property use_stream_voice_activity

Returns True if a user can use voice activity in stream channels.

Type

bool

property receive_all_events

Returns True if a bot can receive all server socket events instead of only those that match its prefix.

Type

bool

PermissionOverride

class guilded.PermissionOverride

Represents a role permission override

Unlike a regular Permissions, the default value of a permission is equivalent to None and not False. Setting a value to False is explicitly denying that permission, while setting a value to True is explicitly allowing that permission.

The values supported by this are the same as Permissions with the added possibility of it being set to None.

x == y

Checks if two overrides are equal.

x != y

Checks if two overrides are not equal.

iter(x)

Returns an iterator of (perm, value) pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.

Parameters

**kwargs – Set the value of permissions by their name.

pair()

Tuple[Permissions, Permissions]: Returns the (allow, deny) pair from this override.

classmethod from_pair(allow, deny)

Creates an override from an allow/deny pair of Permissions.

is_empty()

Checks if the permission override is currently empty.

An empty permission override is one that has no overrides set to True or False.

Returns

Indicates if the override is empty.

Return type

bool

update(**kwargs)

Bulk updates this permission override object.

Allows you to set multiple attributes by using keyword arguments. The names must be equivalent to the properties listed. Extraneous key/value pairs will be silently ignored.

Parameters

**kwargs – A list of key/value pairs to bulk update with.

to_dict()

Dict[str, Optional[bool]]: Converts this override object into a dict.

RawReactionActionEvent

class guilded.RawReactionActionEvent

Represents the payload for a raw reaction add/remove event.

parent_id

The ID of the reaction’s parent content.

Type

Union[str, int]

message_id

This exists for compatibility with discord.py bots. It may be removed in a later version.

This is an alias of parent_id.

Type

Union[str, int]

user_id

The user ID that added or removed their reaction.

Type

str

channel_id

The channel ID that the reaction’s content is in.

Type

str

server

The server that the reaction is in, if applicable.

Type

Optional[Server]

emote

The emote that the reaction shows.

Type

Emote

emoji

This is an alias of emote.

The emote that the reaction shows.

Type

Emote

member

The member that added or removed their reaction. This is only available if the member was cached prior to this event being received. This will be a User if the reaction is in a DM.

Type

Optional[Union[Member, User]]

event_type

The event type that this action was created from. For messages, this will be one of ChatMessageReactionCreated or ChatMessageReactionDeleted.

Type

str

RepeatInfo

class guilded.RepeatInfo

Represents simplified repeat info for a calendar event.

New in version 1.7.

type

The type of interval for the repeating event. Custom intervals are able to specify additional details. Otherwise, the event will repeat for 180 days.

Type

Union[RepeatInterval, CustomRepeatInterval]

interval_count

How often the event should repeat between the interval. E.g., A value of 1 with a type of CustomRepeatInterval.daily would be once per day, and a value of 2 with a type of CustomRepeatInterval.daily would be once per two days. Defaults to 1 if applicable and not specified.

Type

Optional[int]

end_after_count

The maximum number of repeats for the event. If used with end_at, the earliest end date of the two is used.

Type

Optional[int]

end_at

The timestamp at which the event should stop repeating. If used with end_after_count, the earliest end date of the two is used.

Type

Optional[datetime.datetime]

weekdays

The days of the week that the event should repeat on. Only applicable for type CustomRepeatInterval.weekly.

Type

Optional[List[Weekday]]

Status

class guilded.Status

Represents a user’s status.

This is displayed under the user’s name in the sidebar, analogous to an “activity” on Discord.

content

The content of the status.

Type

Optional[str]

emote_id

The ID of the emote associated with the status.

Type

int

Exceptions

exception guilded.GuildedException

Base class for all guilded.py exceptions.

exception guilded.ClientException

Thrown when an operation in the Client fails.

exception guilded.HTTPException(response, data)

A non-ok response from Guilded was returned whilst performing an HTTP request.

response

The aiohttp.ClientResponse of the failed request.

Type

aiohttp.ClientResponse

status

The HTTP status code of the request.

Type

int

code

A PascalCase representation of the HTTP status code. Could also be called the error’s name. Probably not useful in most cases.

Type

str

message

The message that came with the error.

Type

str

exception guilded.BadRequest(response, data)

Thrown on status code 400

exception guilded.Forbidden(response, data)

Thrown on status code 403

raw_missing_permissions

If applicable, the permissions that the client is missing for the operation. This is a list of raw permissions values.

New in version 1.9.1.

Type

Optional[List[str]]

exception guilded.NotFound(response, data)

Thrown on status code 404

exception guilded.ImATeapot(response, data)

Thrown on status code 418

Currently, this error should only be thrown from Read a server member’s permissions, when the member does not have all the permissions passed to ids.

New in version 1.9.1.

raw_missing_permissions

If applicable, the permissions that the member is missing. This is a list of raw permissions values.

Type

Optional[List[str]]

exception guilded.TooManyRequests(response, data)

Thrown on status code 429

exception guilded.GuildedServerError(response, data)

Thrown on status code 500

exception guilded.InvalidArgument

Thrown when an argument to a function is invalid some way (e.g. wrong value or wrong type).

This could be considered the analogous of ValueError and TypeError except inherited from ClientException and thus GuildedException.

Hierarchy