baseplugin
roblox.bases.baseplugin
¶
This file contains the BasePlugin object, which represents a Roblox plugin ID.
BasePlugin (BaseAsset)
¶
Represents a Roblox plugin ID. Plugins are a form of Asset and as such this object derives from BaseAsset.
Attributes:
Name | Type | Description |
---|---|---|
_shared |
ClientSharedObject |
The ClientSharedObject. |
id |
int |
The plugin ID. |
Source code in roblox/bases/baseplugin.py
class BasePlugin(BaseAsset):
"""
Represents a Roblox plugin ID.
Plugins are a form of Asset and as such this object derives from BaseAsset.
Attributes:
_shared: The ClientSharedObject.
id: The plugin ID.
"""
def __init__(self, shared: ClientSharedObject, plugin_id: int):
"""
Arguments:
shared: The ClientSharedObject.
plugin_id: The plugin ID.
"""
super().__init__(shared, plugin_id)
self._shared: ClientSharedObject = shared
self.id: int = plugin_id
async def update(self, name: str = None, description: str = None, comments_enabled: str = None):
"""
Updates the plugin's data.
Arguments:
name: The new group name.
description: The new group description.
comments_enabled: Whether to enable comments.
"""
await self._shared.requests.patch(
url=self._shared.url_generator.get_url(
"develop", f"v1/plugins/{self.id}"
),
json={
"name": name,
"description": description,
"commentsEnabled": comments_enabled
}
)
__init__(self, shared: ClientSharedObject, plugin_id: int)
special
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shared |
ClientSharedObject |
The ClientSharedObject. |
required |
plugin_id |
int |
The plugin ID. |
required |
Source code in roblox/bases/baseplugin.py
def __init__(self, shared: ClientSharedObject, plugin_id: int):
"""
Arguments:
shared: The ClientSharedObject.
plugin_id: The plugin ID.
"""
super().__init__(shared, plugin_id)
self._shared: ClientSharedObject = shared
self.id: int = plugin_id
update(self, name: str = None, description: str = None, comments_enabled: str = None)
async
¶
Updates the plugin's data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str |
The new group name. |
None |
description |
str |
The new group description. |
None |
comments_enabled |
str |
Whether to enable comments. |
None |
Source code in roblox/bases/baseplugin.py
async def update(self, name: str = None, description: str = None, comments_enabled: str = None):
"""
Updates the plugin's data.
Arguments:
name: The new group name.
description: The new group description.
comments_enabled: Whether to enable comments.
"""
await self._shared.requests.patch(
url=self._shared.url_generator.get_url(
"develop", f"v1/plugins/{self.id}"
),
json={
"name": name,
"description": description,
"commentsEnabled": comments_enabled
}
)