hikaripersist.rule
ChannelRule
ChannelRule(
*,
channel_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
channel_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
guild_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
guild_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
predicate: (
Callable[[hikari.GuildChannel], bool] | None
) = None
)
Channel cache rule.
Create a cache channel rule.
| PARAMETER | DESCRIPTION |
|---|---|
channel_denylist
|
If provided, an iterable of channels to ignore.
TYPE:
|
channel_allowlist
|
If provided, ignore all channels except these.
TYPE:
|
guild_denylist
|
If provided, an iterable of guilds to ignore.
TYPE:
|
guild_allowlist
|
If provided, ignore all guilds except these.
TYPE:
|
predicate
|
If provided, a predicate method used for advanced, custom filtration of pending
channels. Returns
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any parameter except |
GuildRule
GuildRule(
*,
guild_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
guild_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
predicate: Callable[[hikari.Guild], bool] | None = None
)
Guild cache rule.
Create a cache guild rule.
| PARAMETER | DESCRIPTION |
|---|---|
guild_denylist
|
If provided, an iterable of all guilds to ignore.
TYPE:
|
guild_allowlist
|
If provided, ignore all guilds except these.
TYPE:
|
predicate
|
If provided, a predicate method used for advanced, custom filtration of pending
guilds. Returns |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any parameter except |
MemberRule
MemberRule(
*,
guild_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
guild_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
user_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
user_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
predicate: Callable[[hikari.Member], bool] | None = None
)
Member cache rule.
Create a cache member rule.
| PARAMETER | DESCRIPTION |
|---|---|
guild_denylist
|
If provided, an iterable of all guilds to ignore.
TYPE:
|
guild_allowlist
|
If provided, ignore all guilds except these.
TYPE:
|
user_denylist
|
If provided, an iterable of all users to ignore.
TYPE:
|
user_allowlist
|
If provided, ignore all users except these.
TYPE:
|
predicate
|
If provided, a predicate method used for advanced, custom filtration of pending
members. Returns |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any parameter except |
RoleRule
RoleRule(
*,
guild_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
guild_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
role_denylist: (
Iterable[hikari.Snowflakeish] | None
) = None,
role_allowlist: (
Iterable[hikari.Snowflakeish] | None
) = None,
predicate: Callable[[hikari.Role], bool] | None = None
)
Role cache rule.
Create a cache role rule.
| PARAMETER | DESCRIPTION |
|---|---|
guild_denylist
|
If provided, an iterable of all guilds to ignore.
TYPE:
|
guild_allowlist
|
If provided, ignore all guilds except these.
TYPE:
|
role_denylist
|
If provided, an iterable of all roles to ignore.
TYPE:
|
role_allowlist
|
If provided, ignore all roles except these.
TYPE:
|
predicate
|
If provided, a predicate method used for advanced, custom filtration of pending
roles. Returns |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If any parameter except |
Rule
Rule(
*,
channel: ChannelRule | None = None,
guild: GuildRule | None = None,
member: MemberRule | None = None,
role: RoleRule | None = None
)
Cache ruleset.
Create a cache rule.
| PARAMETER | DESCRIPTION |
|---|---|
channel
|
If provided, rule regarding channel caching.
TYPE:
|
guild
|
If provided, rule regarding guild caching.
TYPE:
|
member
|
If provided, rule regarding member caching.
TYPE:
|
role
|
If provided, rule regarding role caching.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
|