1.0.0 #253
| @@ -24,6 +24,7 @@ export interface AutoRoleRule extends Data { | ||||
|   id?: number; | ||||
|   emojiName?: string; | ||||
|   roleId?: string; | ||||
|   roleName?: string; | ||||
|   autoRole?: AutoRole; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -16,7 +16,7 @@ export class Mutations { | ||||
|   `; | ||||
|  | ||||
|   static createAutoRole = ` | ||||
|     mutation updateAutoRole($serverId: ID, $channelId: String, $messageId: String) { | ||||
|     mutation createAutoRole($serverId: ID, $channelId: String, $messageId: String) { | ||||
|       autoRole { | ||||
|         createAutoRole(input: { serverId: $serverId, channelId: $channelId, messageId: $messageId }) { | ||||
|           id | ||||
| @@ -29,7 +29,7 @@ export class Mutations { | ||||
|   `; | ||||
|  | ||||
|   static deleteAutoRole = ` | ||||
|     mutation updateAutoRole($id: ID) { | ||||
|     mutation deleteAutoRole($id: ID) { | ||||
|       autoRole { | ||||
|         deleteAutoRole(id: $id) { | ||||
|           id | ||||
| @@ -40,4 +40,30 @@ export class Mutations { | ||||
|       } | ||||
|     } | ||||
|   `; | ||||
|  | ||||
|   static createAutoRoleRule = ` | ||||
|     mutation createAutoRoleRule($autoRoleId: ID, $emojiName: String, roleId: String) { | ||||
|       autoRoleRule { | ||||
|         createAutoRoleRule(input: { autoRoleId: $autoRoleId, emojiName: $emojiName, roleId: $roleId }) { | ||||
|           id | ||||
|           emojiName | ||||
|           roleId | ||||
|           roleName | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   `; | ||||
|  | ||||
|   static deleteAutoRoleRule = ` | ||||
|     mutation deleteAutoRoleRule($id: ID) { | ||||
|       autoRoleRule { | ||||
|         deleteAutoRoleRule(id: $id) { | ||||
|           id | ||||
|           emojiName | ||||
|           roleId | ||||
|           roleName | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   `; | ||||
| } | ||||
|   | ||||
| @@ -175,4 +175,27 @@ export class Queries { | ||||
|       } | ||||
|     } | ||||
|   `; | ||||
|  | ||||
|   static autoRoleRulesQuery = ` | ||||
|     query AutoRoleRuleQuery($serverId: ID, $autoRoleId: ID, $filter: AutoRoleFilter, $page: Page, $sort: Sort) { | ||||
|       servers(filter: {id: $serverId} { | ||||
|         autoRoles(filter: {id: $autoRoleId}) { | ||||
|           autoRoleRuleCount | ||||
|           autoRoleRules(filter: $filter, page: $page, sort: $sort) { | ||||
|             id | ||||
|             emojiName | ||||
|             roleId | ||||
|             roleName | ||||
|  | ||||
|             autoRole { | ||||
|               id | ||||
|             } | ||||
|  | ||||
|             createdAt | ||||
|             modifiedAt | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   `; | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| import { Server } from "../data/server.model"; | ||||
| import { User } from "../data/user.model"; | ||||
| import { AutoRole } from "../data/auto_role.model"; | ||||
| import { AutoRole, AutoRoleRule } from "../data/auto_role.model"; | ||||
| import { Guild } from "../data/discord.model"; | ||||
| import { Level } from "../data/level.model"; | ||||
|  | ||||
| @@ -28,3 +28,8 @@ export interface AutoRoleQuery { | ||||
|   autoRoles: AutoRole[]; | ||||
| } | ||||
|  | ||||
| export interface AutoRoleRuleQuery { | ||||
|   autoRoleRuleCount: number; | ||||
|   autoRoleRules: AutoRoleRule[]; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user