banterbotapi 0.2.7__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/PKG-INFO +1 -1
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/__init__.py +1 -1
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/client.py +15 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/http.py +22 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterbotapi.egg-info/PKG-INFO +1 -1
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/pyproject.toml +1 -1
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/LICENSE +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/README.md +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/commands.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/embed.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/errors.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/gateway.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/intents.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/interactions.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/models.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterapi/permissions.py +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterbotapi.egg-info/SOURCES.txt +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterbotapi.egg-info/dependency_links.txt +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterbotapi.egg-info/requires.txt +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/banterbotapi.egg-info/top_level.txt +0 -0
- {banterbotapi-0.2.7 → banterbotapi-0.2.8}/setup.cfg +0 -0
|
@@ -23,7 +23,7 @@ The library mirrors discord.py conventions where possible. See the Bot,
|
|
|
23
23
|
Intents, Embed, and Permissions classes for the main entry points.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
__version__ = "0.2.
|
|
26
|
+
__version__ = "0.2.8"
|
|
27
27
|
|
|
28
28
|
from .client import Bot
|
|
29
29
|
from .intents import Intents
|
|
@@ -414,6 +414,21 @@ class Bot:
|
|
|
414
414
|
d = await self._http.get_guild(guild_id)
|
|
415
415
|
return Guild.from_dict(d) if d else None
|
|
416
416
|
|
|
417
|
+
async def edit_guild(self, guild_id, *, name=None, description=None, welcome_channel_id=None):
|
|
418
|
+
"""Edit guild name, description (bio), or welcome channel.
|
|
419
|
+
|
|
420
|
+
Requires MANAGE_GUILD in the guild. Server enforces this via
|
|
421
|
+
the bot's actual roles — SDK-side perm claims are ignored.
|
|
422
|
+
Bots can't create or delete guilds; only edits are permitted.
|
|
423
|
+
"""
|
|
424
|
+
d = await self._http.edit_guild(
|
|
425
|
+
guild_id,
|
|
426
|
+
name=name,
|
|
427
|
+
description=description,
|
|
428
|
+
welcome_channel_id=welcome_channel_id,
|
|
429
|
+
)
|
|
430
|
+
return Guild.from_dict(d) if d else None
|
|
431
|
+
|
|
417
432
|
async def get_member(self, guild_id, user_id):
|
|
418
433
|
"""Fetch a guild member by user ID. Returns :class:`Member` or ``None``."""
|
|
419
434
|
d = await self._http.get_member(guild_id, user_id)
|
|
@@ -361,6 +361,28 @@ class HTTPClient:
|
|
|
361
361
|
"GET", "/guilds/{guild_id}", guild_id=guild_id,
|
|
362
362
|
))
|
|
363
363
|
|
|
364
|
+
async def edit_guild(self, guild_id, *, name=None, description=None, welcome_channel_id=None):
|
|
365
|
+
"""PATCH /guilds/{guild_id} — partial update.
|
|
366
|
+
|
|
367
|
+
Requires MANAGE_GUILD in the target guild. Server enforces the
|
|
368
|
+
check against the bot's actual roles — SDK-reported perms are
|
|
369
|
+
ignored. Bots cannot create or delete guilds regardless of
|
|
370
|
+
perms; those routes aren't exposed for bot tokens.
|
|
371
|
+
|
|
372
|
+
Pass ``description=""`` to clear the guild bio.
|
|
373
|
+
"""
|
|
374
|
+
body = {}
|
|
375
|
+
if name is not None:
|
|
376
|
+
body["name"] = name
|
|
377
|
+
if description is not None:
|
|
378
|
+
body["description"] = description
|
|
379
|
+
if welcome_channel_id is not None:
|
|
380
|
+
body["welcome_channel_id"] = welcome_channel_id
|
|
381
|
+
return await self.request(
|
|
382
|
+
Route("PATCH", "/guilds/{guild_id}", guild_id=guild_id),
|
|
383
|
+
json_body=body,
|
|
384
|
+
)
|
|
385
|
+
|
|
364
386
|
async def list_roles(self, guild_id):
|
|
365
387
|
"""GET /guilds/{guild_id}/roles"""
|
|
366
388
|
return await self.request(Route(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|