Parameters
- data:
| { _id: string; channel_type: "SavedMessages"; user: string }
| {
_id: string;
active: boolean;
channel_type: "DirectMessage";
last_message_id?: null | string;
recipients: string[];
}
| {
_id: string;
channel_type: "Group";
description?: null
| string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name: string;
nsfw?: boolean;
owner: string;
permissions?: null | number;
recipients: string[];
}
| {
_id: string;
channel_type: "TextChannel";
default_permissions?: null
| { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name: string;
nsfw?: boolean;
role_permissions?: { [key: string]: { a: number; d: number } };
server: string;
}
| {
_id: string;
channel_type: "VoiceChannel";
default_permissions?: null
| { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
name: string;
nsfw?: boolean;
role_permissions?: { [key: string]: { a: number; d: number } };
server: string;
}- { _id: string; channel_type: "SavedMessages"; user: string }
_id: string
channel_type: "SavedMessages"
user: string
- {
_id: string;
active: boolean;
channel_type: "DirectMessage";
last_message_id?: null | string;
recipients: string[];
}_id: string
active: boolean
channel_type: "DirectMessage"
Optional
last_message_id?: null | string
recipients: string[]
- {
_id: string;
channel_type: "Group";
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name: string;
nsfw?: boolean;
owner: string;
permissions?: null | number;
recipients: string[];
}_id: string
channel_type: "Group"
Optional
description?: null | string
Optional
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
}
Optional
last_message_id?: null | string
name: string
Optional
nsfw?: boolean
owner: string
Optional
permissions?: null | number
recipients: string[]
- {
_id: string;
channel_type: "TextChannel";
default_permissions?: null | { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name: string;
nsfw?: boolean;
role_permissions?: { [key: string]: { a: number; d: number } };
server: string;
}_id: string
channel_type: "TextChannel"
Optional
default_permissions?: null | { a: number; d: number }
Optional
description?: null | string
Optional
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
}
Optional
last_message_id?: null | string
name: string
Optional
nsfw?: boolean
Optional
role_permissions?: { [key: string]: { a: number; d: number } }
server: string
- {
_id: string;
channel_type: "VoiceChannel";
default_permissions?: null | { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
name: string;
nsfw?: boolean;
role_permissions?: { [key: string]: { a: number; d: number } };
server: string;
}_id: string
channel_type: "VoiceChannel"
Optional
default_permissions?: null | { a: number; d: number }
Optional
description?: null | string
Optional
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: "File" }
| { type: "Text" }
| { height: number; type: "Image"; width: number }
| { height: number; type: "Video"; width: number }
| { type: "Audio" };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
}
name: string
Optional
nsfw?: boolean
Optional
role_permissions?: { [key: string]: { a: number; d: number } }
server: string
Returns Promise<unknown>
A promise that resolves with the created channel.
Represents the event handler for channel creation.