Tags¶
genjishimada_sdk.tags
¶
OpAlias
¶
OpBase
¶
Bases: Struct
Discriminated union base; JSON will include an 'op' field with the tag.
op: str
property
¶
Return the operation type.
OpClaim
¶
Bases: OpBase
Claim ownership of an existing tag.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag. |
name |
str
|
Name of the tag to claim. |
requester_id |
int
|
Identifier of the user requesting ownership. |
OpCreate
¶
OpEdit
¶
Bases: OpBase
Update the content of an existing tag.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag. |
name |
str
|
Name of the tag to edit. |
new_content |
str
|
Replacement content for the tag. |
owner_id |
int
|
Identifier of the user editing the tag. |
OpIncrementUsage
¶
OpPurge
¶
Bases: OpBase
Bulk-remove all tags belonging to an owner.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag collection. |
owner_id |
int
|
Identifier of the owner whose tags are purged. |
requester_id |
int
|
Identifier of the user requesting the purge. |
OpRemove
¶
Bases: OpBase
Delete a tag by name.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag. |
name |
str
|
Name of the tag to remove. |
requester_id |
int
|
Identifier of the user requesting removal. |
OpRemoveById
¶
Bases: OpBase
Delete a tag by its identifier.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag. |
tag_id |
int
|
Identifier of the tag to remove. |
requester_id |
int
|
Identifier of the user requesting removal. |
OpTransfer
¶
Bases: OpBase
Transfer tag ownership to another user.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tag. |
name |
str
|
Name of the tag to transfer. |
new_owner_id |
int
|
Identifier of the user receiving ownership. |
requester_id |
int
|
Identifier of the user requesting the transfer. |
TagOp = OpCreate | OpAlias | OpEdit | OpRemove | OpRemoveById | OpClaim | OpTransfer | OpPurge | OpIncrementUsage
module-attribute
¶
TagRowDTO
¶
Bases: Struct
Represents a tag row with optional metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Unique tag identifier. |
guild_id |
int
|
Discord guild that owns the tag. |
name |
str
|
Tag name. |
owner_id |
int
|
Identifier of the tag owner. |
is_alias |
bool
|
Whether the tag is an alias. |
canonical_name |
str | None
|
Canonical tag name when this row is an alias. |
uses |
int | None
|
Number of times the tag has been used. |
content |
str | None
|
Tag content payload. |
rank |
int | None
|
Optional ranking position for search results. |
canonical_name: str | None = None
class-attribute
instance-attribute
¶
content: str | None = None
class-attribute
instance-attribute
¶
guild_id: int
instance-attribute
¶
id: int
instance-attribute
¶
is_alias: bool = False
class-attribute
instance-attribute
¶
name: str
instance-attribute
¶
owner_id: int
instance-attribute
¶
rank: int | None = None
class-attribute
instance-attribute
¶
uses: int | None = None
class-attribute
instance-attribute
¶
TagsAutocompleteRequest
¶
Bases: Struct
Request payload for tag autocomplete queries.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tags. |
q |
str
|
User-entered query string. |
mode |
Literal['aliased', 'non_aliased', 'owned_aliased', 'owned_non_aliased']
|
Autocomplete mode controlling alias inclusion. |
owner_id |
int | None
|
Filter results by owner. |
limit |
int
|
Maximum number of suggestions to return. |
guild_id: int
instance-attribute
¶
limit: int = 12
class-attribute
instance-attribute
¶
mode: Literal['aliased', 'non_aliased', 'owned_aliased', 'owned_non_aliased'] = 'aliased'
class-attribute
instance-attribute
¶
owner_id: int | None = None
class-attribute
instance-attribute
¶
q: str
instance-attribute
¶
TagsAutocompleteResponse
¶
TagsMutateRequest
¶
TagsMutateResponse
¶
Bases: Struct
Response containing results for each mutation operation.
Attributes:
| Name | Type | Description |
|---|---|---|
results |
list[TagsMutateResult]
|
Ordered list of operation results. |
results: list[TagsMutateResult]
instance-attribute
¶
TagsMutateResult
¶
Bases: Struct
Result of a single tag mutation operation.
Attributes:
| Name | Type | Description |
|---|---|---|
ok |
bool
|
Whether the operation succeeded. |
message |
str | None
|
Optional human-readable message. |
affected |
int | None
|
Number of rows affected by the operation. |
tag_id |
int | None
|
Identifier of the tag affected, if applicable. |
TagsSearchFilters
¶
Bases: Struct
Search filters for tag queries.
Attributes:
| Name | Type | Description |
|---|---|---|
guild_id |
int
|
Discord guild identifier that owns the tags. |
name |
str | None
|
Raw tag name to search for. |
fuzzy |
bool
|
Whether to enable fuzzy matching. |
include_aliases |
bool
|
Whether to include aliases in results. |
only_aliases |
bool
|
Whether to return only alias rows. |
owner_id |
int | None
|
Filter by tag owner. |
random |
bool
|
Whether to return a random tag. |
by_id |
int | None
|
Lookup a specific tag by ID. |
include_content |
bool
|
Include content body in results. |
include_rank |
bool
|
Include ranking information in results. |
sort_by |
Literal['name', 'uses', 'created_at']
|
Sorting column for the result set. |
sort_dir |
Literal['asc', 'desc']
|
Sorting direction for results. |
limit |
int
|
Maximum number of rows to return. |
offset |
int
|
Number of rows to skip for pagination. |
by_id: int | None = None
class-attribute
instance-attribute
¶
fuzzy: bool = False
class-attribute
instance-attribute
¶
guild_id: int
instance-attribute
¶
include_aliases: bool = True
class-attribute
instance-attribute
¶
include_content: bool = False
class-attribute
instance-attribute
¶
include_rank: bool = False
class-attribute
instance-attribute
¶
limit: int = 20
class-attribute
instance-attribute
¶
name: str | None = None
class-attribute
instance-attribute
¶
offset: int = 0
class-attribute
instance-attribute
¶
only_aliases: bool = False
class-attribute
instance-attribute
¶
owner_id: int | None = None
class-attribute
instance-attribute
¶
random: bool = False
class-attribute
instance-attribute
¶
sort_by: Literal['name', 'uses', 'created_at'] = 'name'
class-attribute
instance-attribute
¶
sort_dir: Literal['asc', 'desc'] = 'asc'
class-attribute
instance-attribute
¶
TagsSearchResponse
¶
Bases: Struct
Response for tag search queries.
Attributes:
| Name | Type | Description |
|---|---|---|
items |
list[TagRowDTO]
|
Matching tags. |
total |
int | None
|
Optional total for pagination. |
suggestions |
list[str] | None
|
Optional fallback suggestions for fuzzy matches. |