Script Trigger Reference of GS2-Guild
Trigger
createGuild
Creating guild
Synchronous Execution Script
The script is executed synchronously before the creating guild process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow creating guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Creating guild.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
result = {
}updateGuild
Update guild
Synchronous Execution Script
The script is executed synchronously before the update guild process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| oldGuild | Guild | Guild before update |
| newGuild | Guild | Guild after update |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow update guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
oldGuild = args.oldGuild
newGuild = args.newGuild
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Update guild.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| oldGuild | Guild | Guild before update |
| newGuild | Guild | Guild after update |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
oldGuild = args.oldGuild
newGuild = args.newGuild
result = {
}joinGuild
Join guild
Synchronous Execution Script
The script is executed synchronously before the join guild process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| userId | string | User ID |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow join guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Join guild.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| userId | string | User ID |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId
result = {
}leaveGuild
Leave guild
Synchronous Execution Script
The script is executed synchronously before the leave guild process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| userId | string | User ID |
| self | bool | Whether the user left the guild themselves or was removed by the guild master, or if the guild was disbanded |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow leave guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId
self = args.self
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Leave guild.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| userId | string | User ID |
| self | bool | Whether the user left the guild themselves or was removed by the guild master, or if the guild was disbanded |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId
self = args.self
result = {
}changeRole
Change role
Synchronous Execution Script
The script is executed synchronously before the change role process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| oldMembers | Member[] | Old Member Information |
| newMembers | Member[] | New Member Information |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow change role |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
oldMembers = args.oldMembers
newMembers = args.newMembers
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Change role.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| oldMembers | Member[] | Old Member Information |
| newMembers | Member[] | New Member Information |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
oldMembers = args.oldMembers
newMembers = args.newMembers
result = {
}deleteGuild
Delete Guild
Synchronous Execution Script
The script is executed synchronously before the delete guild process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow delete guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Delete Guild.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
result = {
}receiveJoinRequest
Receive join request
Synchronous Execution Script
The script is executed synchronously before the receive join request process.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| receiveMemberRequest | ReceiveMemberRequest | Join Request |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow receive join request |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
receiveMemberRequest = args.receiveMemberRequest
result = {
permit=permit
}Asynchronous Execution Script
The script executes asynchronously after the Receive join request.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| guildModel | GuildModel | Guild Model |
| guild | Guild | Guild |
| receiveMemberRequest | ReceiveMemberRequest | Join Request |
Implementation Example
namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
receiveMemberRequest = args.receiveMemberRequest
result = {
}