1.1.0.rc4 #345
@ -41,6 +41,9 @@ export class Queries {
|
||||
query ServerConfigDiscordQuery($id: ID) {
|
||||
discord {
|
||||
guilds(filter: {id: $id}) {
|
||||
id
|
||||
name
|
||||
|
||||
roles {
|
||||
id
|
||||
name
|
||||
|
@ -91,7 +91,7 @@ export class ConfigComponent implements OnInit {
|
||||
}
|
||||
|
||||
if (data[1].discord.guilds) {
|
||||
const guild = data[1].discord.guilds[0];
|
||||
const guild = data[1].discord.guilds.filter(g => g.id === this.server.discordId)[0];
|
||||
this.roles = guild.roles ?? undefined;
|
||||
this.voiceChannels = guild.channels.filter(x => x.type == ChannelType.voice) ?? undefined;
|
||||
this.textChannels = guild.channels.filter(x => x.type == ChannelType.text) ?? undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user