1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Sandu Liviu Catalin
4e27ba4a4f Expose role type. 2021-09-11 23:16:14 +03:00
Sandu Liviu Catalin
19102a9334 Implement base layout for all events. 2021-09-11 22:43:30 +03:00
Sandu Liviu Catalin
1d8d31518c Refactor presence and activity types. 2021-09-11 21:38:46 +03:00
Sandu Liviu Catalin
a19a171e0d Expose user type. 2021-09-11 21:18:45 +03:00
Sandu Liviu Catalin
4c3921d88a Update sqratTypes.h 2021-09-11 21:02:05 +03:00
Sandu Liviu Catalin
e9f5111a33 Expose guild type.
Refactor constants to be more compile time efficient.
2021-09-11 20:36:19 +03:00
Sandu Liviu Catalin
08a5ba3154 Update sqratObject.h 2021-09-11 20:35:27 +03:00
Sandu Liviu Catalin
13a7a98abe Update sqratArray.h 2021-09-11 20:35:22 +03:00
9 changed files with 4898 additions and 758 deletions

View File

@ -141,32 +141,32 @@ void DpCluster::OnGuildJoinRequestDelete(const dpp::guild_join_request_delete_t
// ------------------------------------------------------------------------------------------------
void DpCluster::OnInteractionCreate(const dpp::interaction_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::InteractionCreate, new dpp::interaction_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::InteractionCreate, new DpInteractionCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnButtonClick(const dpp::button_click_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ButtonClick, new dpp::button_click_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ButtonClick, new DpButtonClickEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnSelectClick(const dpp::select_click_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::SelectClick, new dpp::select_click_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::SelectClick, new DpSelectClickEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildDelete(const dpp::guild_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildDelete, new dpp::guild_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildDelete, new DpGuildDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnChannelDelete(const dpp::channel_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ChannelDelete, new dpp::channel_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ChannelDelete, new DpChannelDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnChannelUpdate(const dpp::channel_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ChannelUpdate, new dpp::channel_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ChannelUpdate, new DpChannelUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnReady(const dpp::ready_t & ev)
@ -176,257 +176,257 @@ void DpCluster::OnReady(const dpp::ready_t & ev)
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageDelete(const dpp::message_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageDelete, new dpp::message_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageDelete, new DpMessageDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnApplicationCommandDelete(const dpp::application_command_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandDelete, new dpp::application_command_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandDelete, new DpApplicationCommandDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildMemberRemove(const dpp::guild_member_remove_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberRemove, new dpp::guild_member_remove_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberRemove, new DpGuildMemberRemoveEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnApplicationCommandCreate(const dpp::application_command_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandCreate, new dpp::application_command_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandCreate, new DpApplicationCommandCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnResumed(const dpp::resumed_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::Resumed, new dpp::resumed_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::Resumed, new DpResumedEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildRoleCreate(const dpp::guild_role_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleCreate, new dpp::guild_role_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleCreate, new DpGuildRoleCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnTypingStart(const dpp::typing_start_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::TypingStart, new dpp::typing_start_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::TypingStart, new DpTypingStartEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageReactionAdd(const dpp::message_reaction_add_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionAdd, new dpp::message_reaction_add_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionAdd, new DpMessageReactionAddEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildMembersChunk(const dpp::guild_members_chunk_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildMembersChunk, new dpp::guild_members_chunk_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildMembersChunk, new DpGuildMembersChunkEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageReactionRemove(const dpp::message_reaction_remove_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemove, new dpp::message_reaction_remove_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemove, new DpMessageReactionRemoveEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildCreate(const dpp::guild_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildCreate, new dpp::guild_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildCreate, new DpGuildCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnChannelCreate(const dpp::channel_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ChannelCreate, new dpp::channel_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ChannelCreate, new DpChannelCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageReactionRemoveEmoji(const dpp::message_reaction_remove_emoji_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemoveEmoji, new dpp::message_reaction_remove_emoji_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemoveEmoji, new DpMessageReactionRemoveEmojiEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageDeleteBulk(const dpp::message_delete_bulk_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageDeleteBulk, new dpp::message_delete_bulk_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageDeleteBulk, new DpMessageDeleteBulkEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildRoleUpdate(const dpp::guild_role_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleUpdate, new dpp::guild_role_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleUpdate, new DpGuildRoleUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildRoleDelete(const dpp::guild_role_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleDelete, new dpp::guild_role_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildRoleDelete, new DpGuildRoleDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnChannelPinsUpdate(const dpp::channel_pins_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ChannelPinsUpdate, new dpp::channel_pins_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ChannelPinsUpdate, new DpChannelPinsUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageReactionRemoveAll(const dpp::message_reaction_remove_all_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemoveAll, new dpp::message_reaction_remove_all_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageReactionRemoveAll, new DpMessageReactionRemoveAllEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceServerUpdate(const dpp::voice_server_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceServerUpdate, new dpp::voice_server_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceServerUpdate, new DpVoiceServerUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildEmojisUpdate(const dpp::guild_emojis_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildEmojisUpdate, new dpp::guild_emojis_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildEmojisUpdate, new DpGuildEmojisUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildStickersUpdate(const dpp::guild_stickers_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildStickersUpdate, new dpp::guild_stickers_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildStickersUpdate, new DpGuildStickersUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnPresenceUpdate(const dpp::presence_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::PresenceUpdate, new dpp::presence_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::PresenceUpdate, new DpPresenceUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnWebhooksUpdate(const dpp::webhooks_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::WebhooksUpdate, new dpp::webhooks_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::WebhooksUpdate, new DpWebhooksUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildMemberAdd(const dpp::guild_member_add_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberAdd, new dpp::guild_member_add_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberAdd, new DpGuildMemberAddEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnInviteDelete(const dpp::invite_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::InviteDelete, new dpp::invite_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::InviteDelete, new DpInviteDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildUpdate(const dpp::guild_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildUpdate, new dpp::guild_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildUpdate, new DpGuildUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildIntegrationsUpdate(const dpp::guild_integrations_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildIntegrationsUpdate, new dpp::guild_integrations_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildIntegrationsUpdate, new DpGuildIntegrationsUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildMemberUpdate(const dpp::guild_member_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberUpdate, new dpp::guild_member_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildMemberUpdate, new DpGuildMemberUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnApplicationCommandUpdate(const dpp::application_command_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandUpdate, new dpp::application_command_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ApplicationCommandUpdate, new DpApplicationCommandUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnInviteCreate(const dpp::invite_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::InviteCreate, new dpp::invite_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::InviteCreate, new DpInviteCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageUpdate(const dpp::message_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageUpdate, new dpp::message_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageUpdate, new DpMessageUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnUserUpdate(const dpp::user_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::UserUpdate, new dpp::user_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::UserUpdate, new DpUserUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnMessageCreate(const dpp::message_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::MessageCreate, new dpp::message_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::MessageCreate, new DpMessageCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildBanAdd(const dpp::guild_ban_add_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildBanAdd, new dpp::guild_ban_add_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildBanAdd, new DpGuildBanAddEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnGuildBanRemove(const dpp::guild_ban_remove_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::GuildBanRemove, new dpp::guild_ban_remove_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::GuildBanRemove, new DpGuildBanRemoveEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnIntegrationCreate(const dpp::integration_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationCreate, new dpp::integration_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationCreate, new DpIntegrationCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnIntegrationUpdate(const dpp::integration_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationUpdate, new dpp::integration_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationUpdate, new DpIntegrationUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnIntegrationDelete(const dpp::integration_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationDelete, new dpp::integration_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::IntegrationDelete, new DpIntegrationDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadCreate(const dpp::thread_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadCreate, new dpp::thread_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadCreate, new DpThreadCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadUpdate(const dpp::thread_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadUpdate, new dpp::thread_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadUpdate, new DpThreadUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadDelete(const dpp::thread_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadDelete, new dpp::thread_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadDelete, new DpThreadDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadListSync(const dpp::thread_list_sync_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadListSync, new dpp::thread_list_sync_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadListSync, new DpThreadListSyncEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadMemberUpdate(const dpp::thread_member_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadMemberUpdate, new dpp::thread_member_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadMemberUpdate, new DpThreadMemberUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnThreadMembersUpdate(const dpp::thread_members_update_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::ThreadMembersUpdate, new dpp::thread_members_update_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::ThreadMembersUpdate, new DpThreadMembersUpdateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceBufferSend(const dpp::voice_buffer_send_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceBufferSend, new dpp::voice_buffer_send_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceBufferSend, new DpVoiceBufferSendEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceUserTalking(const dpp::voice_user_talking_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceUserTalking, new dpp::voice_user_talking_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceUserTalking, new DpVoiceUserTalkingEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceReady(const dpp::voice_ready_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceReady, new dpp::voice_ready_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceReady, new DpVoiceReadyEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceReceive(const dpp::voice_receive_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceReceive, new dpp::voice_receive_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceReceive, new DpVoiceReceiveEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnVoiceTrackMarker(const dpp::voice_track_marker_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::VoiceTrackMarker, new dpp::voice_track_marker_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::VoiceTrackMarker, new DpVoiceTrackMarkerEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnStageInstanceCreate(const dpp::stage_instance_create_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::StageInstanceCreate, new dpp::stage_instance_create_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::StageInstanceCreate, new DpStageInstanceCreateEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
void DpCluster::OnStageInstanceDelete(const dpp::stage_instance_delete_t & ev)
{
//mQueue.enqueue(DpInternalEvent(DpEventID::StageInstanceDelete, new dpp::stage_instance_delete_t(ev)));
mQueue.enqueue(DpInternalEvent(DpEventID::StageInstanceDelete, new DpStageInstanceDeleteEvent(ev)));
}
// ------------------------------------------------------------------------------------------------
@ -587,67 +587,67 @@ void DpInternalEvent::Release()
// Identify data type
switch (type)
{
case DpEventID::VoiceStateUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceStateUpdate: delete reinterpret_cast< DpVoiceStateUpdateEvent * >(data); break;
case DpEventID::Log: delete reinterpret_cast< DpLogEvent * >(data); break;
case DpEventID::GuildJoinRequestDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InteractionCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ButtonClick: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::SelectClick: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildJoinRequestDelete: delete reinterpret_cast< DpGuildJoinRequestDeleteEvent * >(data); break;
case DpEventID::InteractionCreate: delete reinterpret_cast< DpInteractionCreateEvent * >(data); break;
case DpEventID::ButtonClick: delete reinterpret_cast< DpButtonClickEvent * >(data); break;
case DpEventID::SelectClick: delete reinterpret_cast< DpSelectClickEvent * >(data); break;
case DpEventID::GuildDelete: delete reinterpret_cast< DpGuildDeleteEvent * >(data); break;
case DpEventID::ChannelDelete: delete reinterpret_cast< DpChannelDeleteEvent * >(data); break;
case DpEventID::ChannelUpdate: delete reinterpret_cast< DpChannelUpdateEvent * >(data); break;
case DpEventID::Ready: delete reinterpret_cast< DpReadyEvent * >(data); break;
case DpEventID::MessageDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberRemove: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::Resumed: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::TypingStart: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionAdd: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMembersChunk: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemove: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemoveEmoji: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageDeleteBulk: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelPinsUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemoveAll: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceServerUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildEmojisUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildStickersUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::PresenceUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::WebhooksUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberAdd: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InviteDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildIntegrationsUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InviteCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::UserUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildBanAdd: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildBanRemove: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadListSync: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadMemberUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadMembersUpdate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceBufferSend: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceUserTalking: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceReady: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceReceive: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceTrackMarker: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::StageInstanceCreate: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::StageInstanceDelete: delete reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageDelete: delete reinterpret_cast< DpMessageDeleteEvent * >(data); break;
case DpEventID::ApplicationCommandDelete: delete reinterpret_cast< DpApplicationCommandDeleteEvent * >(data); break;
case DpEventID::GuildMemberRemove: delete reinterpret_cast< DpGuildMemberRemoveEvent * >(data); break;
case DpEventID::ApplicationCommandCreate: delete reinterpret_cast< DpApplicationCommandCreateEvent * >(data); break;
case DpEventID::Resumed: delete reinterpret_cast< DpResumedEvent * >(data); break;
case DpEventID::GuildRoleCreate: delete reinterpret_cast< DpGuildRoleCreateEvent * >(data); break;
case DpEventID::TypingStart: delete reinterpret_cast< DpTypingStartEvent * >(data); break;
case DpEventID::MessageReactionAdd: delete reinterpret_cast< DpMessageReactionAddEvent * >(data); break;
case DpEventID::GuildMembersChunk: delete reinterpret_cast< DpGuildMembersChunkEvent * >(data); break;
case DpEventID::MessageReactionRemove: delete reinterpret_cast< DpMessageReactionRemoveEvent * >(data); break;
case DpEventID::GuildCreate: delete reinterpret_cast< DpGuildCreateEvent * >(data); break;
case DpEventID::ChannelCreate: delete reinterpret_cast< DpChannelCreateEvent * >(data); break;
case DpEventID::MessageReactionRemoveEmoji: delete reinterpret_cast< DpMessageReactionRemoveEmojiEvent * >(data); break;
case DpEventID::MessageDeleteBulk: delete reinterpret_cast< DpMessageDeleteBulkEvent * >(data); break;
case DpEventID::GuildRoleUpdate: delete reinterpret_cast< DpGuildRoleUpdateEvent * >(data); break;
case DpEventID::GuildRoleDelete: delete reinterpret_cast< DpGuildRoleDeleteEvent * >(data); break;
case DpEventID::ChannelPinsUpdate: delete reinterpret_cast< DpChannelPinsUpdateEvent * >(data); break;
case DpEventID::MessageReactionRemoveAll: delete reinterpret_cast< DpMessageReactionRemoveAllEvent * >(data); break;
case DpEventID::VoiceServerUpdate: delete reinterpret_cast< DpVoiceServerUpdateEvent * >(data); break;
case DpEventID::GuildEmojisUpdate: delete reinterpret_cast< DpGuildEmojisUpdateEvent * >(data); break;
case DpEventID::GuildStickersUpdate: delete reinterpret_cast< DpGuildStickersUpdateEvent * >(data); break;
case DpEventID::PresenceUpdate: delete reinterpret_cast< DpPresenceUpdateEvent * >(data); break;
case DpEventID::WebhooksUpdate: delete reinterpret_cast< DpWebhooksUpdateEvent * >(data); break;
case DpEventID::GuildMemberAdd: delete reinterpret_cast< DpGuildMemberAddEvent * >(data); break;
case DpEventID::InviteDelete: delete reinterpret_cast< DpInviteDeleteEvent * >(data); break;
case DpEventID::GuildUpdate: delete reinterpret_cast< DpGuildUpdateEvent * >(data); break;
case DpEventID::GuildIntegrationsUpdate: delete reinterpret_cast< DpGuildIntegrationsUpdateEvent * >(data); break;
case DpEventID::GuildMemberUpdate: delete reinterpret_cast< DpGuildMemberUpdateEvent * >(data); break;
case DpEventID::ApplicationCommandUpdate: delete reinterpret_cast< DpApplicationCommandUpdateEvent * >(data); break;
case DpEventID::InviteCreate: delete reinterpret_cast< DpInviteCreateEvent * >(data); break;
case DpEventID::MessageUpdate: delete reinterpret_cast< DpMessageUpdateEvent * >(data); break;
case DpEventID::UserUpdate: delete reinterpret_cast< DpUserUpdateEvent * >(data); break;
case DpEventID::MessageCreate: delete reinterpret_cast< DpMessageCreateEvent * >(data); break;
case DpEventID::GuildBanAdd: delete reinterpret_cast< DpGuildBanAddEvent * >(data); break;
case DpEventID::GuildBanRemove: delete reinterpret_cast< DpGuildBanRemoveEvent * >(data); break;
case DpEventID::IntegrationCreate: delete reinterpret_cast< DpIntegrationCreateEvent * >(data); break;
case DpEventID::IntegrationUpdate: delete reinterpret_cast< DpIntegrationUpdateEvent * >(data); break;
case DpEventID::IntegrationDelete: delete reinterpret_cast< DpIntegrationDeleteEvent * >(data); break;
case DpEventID::ThreadCreate: delete reinterpret_cast< DpThreadCreateEvent * >(data); break;
case DpEventID::ThreadUpdate: delete reinterpret_cast< DpThreadUpdateEvent * >(data); break;
case DpEventID::ThreadDelete: delete reinterpret_cast< DpThreadDeleteEvent * >(data); break;
case DpEventID::ThreadListSync: delete reinterpret_cast< DpThreadListSyncEvent * >(data); break;
case DpEventID::ThreadMemberUpdate: delete reinterpret_cast< DpThreadMemberUpdateEvent * >(data); break;
case DpEventID::ThreadMembersUpdate: delete reinterpret_cast< DpThreadMembersUpdateEvent * >(data); break;
case DpEventID::VoiceBufferSend: delete reinterpret_cast< DpVoiceBufferSendEvent * >(data); break;
case DpEventID::VoiceUserTalking: delete reinterpret_cast< DpVoiceUserTalkingEvent * >(data); break;
case DpEventID::VoiceReady: delete reinterpret_cast< DpVoiceReadyEvent * >(data); break;
case DpEventID::VoiceReceive: delete reinterpret_cast< DpVoiceReceiveEvent * >(data); break;
case DpEventID::VoiceTrackMarker: delete reinterpret_cast< DpVoiceTrackMarkerEvent * >(data); break;
case DpEventID::StageInstanceCreate: delete reinterpret_cast< DpStageInstanceCreateEvent * >(data); break;
case DpEventID::StageInstanceDelete: delete reinterpret_cast< DpStageInstanceDeleteEvent * >(data); break;
case DpEventID::Max: // Fall through
default: LogFtl("Unrecognized discord event instance type"); assert(0); break;
}
@ -660,67 +660,67 @@ SQMOD_NODISCARD LightObj EventToScriptObject(uint8_t type, uintptr_t data)
{
switch (type)
{
case DpEventID::VoiceStateUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceStateUpdate: return LightObj(reinterpret_cast< DpVoiceStateUpdateEvent * >(data));
case DpEventID::Log: return LightObj(reinterpret_cast< DpLogEvent * >(data));
case DpEventID::GuildJoinRequestDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::InteractionCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ButtonClick: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::SelectClick: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ChannelDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ChannelUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildJoinRequestDelete: return LightObj(reinterpret_cast< DpGuildJoinRequestDeleteEvent * >(data));
case DpEventID::InteractionCreate: return LightObj(reinterpret_cast< DpInteractionCreateEvent * >(data));
case DpEventID::ButtonClick: return LightObj(reinterpret_cast< DpButtonClickEvent * >(data));
case DpEventID::SelectClick: return LightObj(reinterpret_cast< DpSelectClickEvent * >(data));
case DpEventID::GuildDelete: return LightObj(reinterpret_cast< DpGuildDeleteEvent * >(data));
case DpEventID::ChannelDelete: return LightObj(reinterpret_cast< DpChannelDeleteEvent * >(data));
case DpEventID::ChannelUpdate: return LightObj(reinterpret_cast< DpChannelUpdateEvent * >(data));
case DpEventID::Ready: return LightObj(reinterpret_cast< DpReadyEvent * >(data));
case DpEventID::MessageDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ApplicationCommandDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildMemberRemove: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ApplicationCommandCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::Resumed: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildRoleCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::TypingStart: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageReactionAdd: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildMembersChunk: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageReactionRemove: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ChannelCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageReactionRemoveEmoji: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageDeleteBulk: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildRoleUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildRoleDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ChannelPinsUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageReactionRemoveAll: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceServerUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildEmojisUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildStickersUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::PresenceUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::WebhooksUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildMemberAdd: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::InviteDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildIntegrationsUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildMemberUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ApplicationCommandUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::InviteCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::UserUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildBanAdd: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::GuildBanRemove: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::IntegrationCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::IntegrationUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::IntegrationDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadListSync: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadMemberUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::ThreadMembersUpdate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceBufferSend: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceUserTalking: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceReady: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceReceive: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::VoiceTrackMarker: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::StageInstanceCreate: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::StageInstanceDelete: return LightObj(reinterpret_cast< uint8_t * >(data));
case DpEventID::MessageDelete: return LightObj(reinterpret_cast< DpMessageDeleteEvent * >(data));
case DpEventID::ApplicationCommandDelete: return LightObj(reinterpret_cast< DpApplicationCommandDeleteEvent * >(data));
case DpEventID::GuildMemberRemove: return LightObj(reinterpret_cast< DpGuildMemberRemoveEvent * >(data));
case DpEventID::ApplicationCommandCreate: return LightObj(reinterpret_cast< DpApplicationCommandCreateEvent * >(data));
case DpEventID::Resumed: return LightObj(reinterpret_cast< DpResumedEvent * >(data));
case DpEventID::GuildRoleCreate: return LightObj(reinterpret_cast< DpGuildRoleCreateEvent * >(data));
case DpEventID::TypingStart: return LightObj(reinterpret_cast< DpTypingStartEvent * >(data));
case DpEventID::MessageReactionAdd: return LightObj(reinterpret_cast< DpMessageReactionAddEvent * >(data));
case DpEventID::GuildMembersChunk: return LightObj(reinterpret_cast< DpGuildMembersChunkEvent * >(data));
case DpEventID::MessageReactionRemove: return LightObj(reinterpret_cast< DpMessageReactionRemoveEvent * >(data));
case DpEventID::GuildCreate: return LightObj(reinterpret_cast< DpGuildCreateEvent * >(data));
case DpEventID::ChannelCreate: return LightObj(reinterpret_cast< DpChannelCreateEvent * >(data));
case DpEventID::MessageReactionRemoveEmoji: return LightObj(reinterpret_cast< DpMessageReactionRemoveEmojiEvent * >(data));
case DpEventID::MessageDeleteBulk: return LightObj(reinterpret_cast< DpMessageDeleteBulkEvent * >(data));
case DpEventID::GuildRoleUpdate: return LightObj(reinterpret_cast< DpGuildRoleUpdateEvent * >(data));
case DpEventID::GuildRoleDelete: return LightObj(reinterpret_cast< DpGuildRoleDeleteEvent * >(data));
case DpEventID::ChannelPinsUpdate: return LightObj(reinterpret_cast< DpChannelPinsUpdateEvent * >(data));
case DpEventID::MessageReactionRemoveAll: return LightObj(reinterpret_cast< DpMessageReactionRemoveAllEvent * >(data));
case DpEventID::VoiceServerUpdate: return LightObj(reinterpret_cast< DpVoiceServerUpdateEvent * >(data));
case DpEventID::GuildEmojisUpdate: return LightObj(reinterpret_cast< DpGuildEmojisUpdateEvent * >(data));
case DpEventID::GuildStickersUpdate: return LightObj(reinterpret_cast< DpGuildStickersUpdateEvent * >(data));
case DpEventID::PresenceUpdate: return LightObj(reinterpret_cast< DpPresenceUpdateEvent * >(data));
case DpEventID::WebhooksUpdate: return LightObj(reinterpret_cast< DpWebhooksUpdateEvent * >(data));
case DpEventID::GuildMemberAdd: return LightObj(reinterpret_cast< DpGuildMemberAddEvent * >(data));
case DpEventID::InviteDelete: return LightObj(reinterpret_cast< DpInviteDeleteEvent * >(data));
case DpEventID::GuildUpdate: return LightObj(reinterpret_cast< DpGuildUpdateEvent * >(data));
case DpEventID::GuildIntegrationsUpdate: return LightObj(reinterpret_cast< DpGuildIntegrationsUpdateEvent * >(data));
case DpEventID::GuildMemberUpdate: return LightObj(reinterpret_cast< DpGuildMemberUpdateEvent * >(data));
case DpEventID::ApplicationCommandUpdate: return LightObj(reinterpret_cast< DpApplicationCommandUpdateEvent * >(data));
case DpEventID::InviteCreate: return LightObj(reinterpret_cast< DpInviteCreateEvent * >(data));
case DpEventID::MessageUpdate: return LightObj(reinterpret_cast< DpMessageUpdateEvent * >(data));
case DpEventID::UserUpdate: return LightObj(reinterpret_cast< DpUserUpdateEvent * >(data));
case DpEventID::MessageCreate: return LightObj(reinterpret_cast< DpMessageCreateEvent * >(data));
case DpEventID::GuildBanAdd: return LightObj(reinterpret_cast< DpGuildBanAddEvent * >(data));
case DpEventID::GuildBanRemove: return LightObj(reinterpret_cast< DpGuildBanRemoveEvent * >(data));
case DpEventID::IntegrationCreate: return LightObj(reinterpret_cast< DpIntegrationCreateEvent * >(data));
case DpEventID::IntegrationUpdate: return LightObj(reinterpret_cast< DpIntegrationUpdateEvent * >(data));
case DpEventID::IntegrationDelete: return LightObj(reinterpret_cast< DpIntegrationDeleteEvent * >(data));
case DpEventID::ThreadCreate: return LightObj(reinterpret_cast< DpThreadCreateEvent * >(data));
case DpEventID::ThreadUpdate: return LightObj(reinterpret_cast< DpThreadUpdateEvent * >(data));
case DpEventID::ThreadDelete: return LightObj(reinterpret_cast< DpThreadDeleteEvent * >(data));
case DpEventID::ThreadListSync: return LightObj(reinterpret_cast< DpThreadListSyncEvent * >(data));
case DpEventID::ThreadMemberUpdate: return LightObj(reinterpret_cast< DpThreadMemberUpdateEvent * >(data));
case DpEventID::ThreadMembersUpdate: return LightObj(reinterpret_cast< DpThreadMembersUpdateEvent * >(data));
case DpEventID::VoiceBufferSend: return LightObj(reinterpret_cast< DpVoiceBufferSendEvent * >(data));
case DpEventID::VoiceUserTalking: return LightObj(reinterpret_cast< DpVoiceUserTalkingEvent * >(data));
case DpEventID::VoiceReady: return LightObj(reinterpret_cast< DpVoiceReadyEvent * >(data));
case DpEventID::VoiceReceive: return LightObj(reinterpret_cast< DpVoiceReceiveEvent * >(data));
case DpEventID::VoiceTrackMarker: return LightObj(reinterpret_cast< DpVoiceTrackMarkerEvent * >(data));
case DpEventID::StageInstanceCreate: return LightObj(reinterpret_cast< DpStageInstanceCreateEvent * >(data));
case DpEventID::StageInstanceDelete: return LightObj(reinterpret_cast< DpStageInstanceDeleteEvent * >(data));
case DpEventID::Max: // Fall through
default: assert(0); return LightObj{};
}
@ -731,67 +731,67 @@ void EventInvokeCleanup(uint8_t type, uintptr_t data)
{
switch (type)
{
case DpEventID::VoiceStateUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceStateUpdate: reinterpret_cast< DpVoiceStateUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::Log: reinterpret_cast< DpLogEvent * >(data)->Cleanup(); break;
case DpEventID::GuildJoinRequestDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InteractionCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ButtonClick: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::SelectClick: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildJoinRequestDelete: reinterpret_cast< DpGuildJoinRequestDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::InteractionCreate: reinterpret_cast< DpInteractionCreateEvent * >(data)->Cleanup(); break;
case DpEventID::ButtonClick: reinterpret_cast< DpButtonClickEvent * >(data)->Cleanup(); break;
case DpEventID::SelectClick: reinterpret_cast< DpSelectClickEvent * >(data)->Cleanup(); break;
case DpEventID::GuildDelete: reinterpret_cast< DpGuildDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ChannelDelete: reinterpret_cast< DpChannelDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ChannelUpdate: reinterpret_cast< DpChannelUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::Ready: reinterpret_cast< DpReadyEvent * >(data)->Cleanup(); break;
case DpEventID::MessageDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberRemove: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::Resumed: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::TypingStart: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionAdd: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMembersChunk: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemove: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemoveEmoji: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageDeleteBulk: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildRoleDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ChannelPinsUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageReactionRemoveAll: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceServerUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildEmojisUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildStickersUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::PresenceUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::WebhooksUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberAdd: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InviteDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildIntegrationsUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildMemberUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ApplicationCommandUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::InviteCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::UserUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildBanAdd: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::GuildBanRemove: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::IntegrationDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadListSync: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadMemberUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::ThreadMembersUpdate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceBufferSend: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceUserTalking: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceReady: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceReceive: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::VoiceTrackMarker: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::StageInstanceCreate: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::StageInstanceDelete: reinterpret_cast< uint8_t * >(data); break;
case DpEventID::MessageDelete: reinterpret_cast< DpMessageDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ApplicationCommandDelete: reinterpret_cast< DpApplicationCommandDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::GuildMemberRemove: reinterpret_cast< DpGuildMemberRemoveEvent * >(data)->Cleanup(); break;
case DpEventID::ApplicationCommandCreate: reinterpret_cast< DpApplicationCommandCreateEvent * >(data)->Cleanup(); break;
case DpEventID::Resumed: reinterpret_cast< DpResumedEvent * >(data)->Cleanup(); break;
case DpEventID::GuildRoleCreate: reinterpret_cast< DpGuildRoleCreateEvent * >(data)->Cleanup(); break;
case DpEventID::TypingStart: reinterpret_cast< DpTypingStartEvent * >(data)->Cleanup(); break;
case DpEventID::MessageReactionAdd: reinterpret_cast< DpMessageReactionAddEvent * >(data)->Cleanup(); break;
case DpEventID::GuildMembersChunk: reinterpret_cast< DpGuildMembersChunkEvent * >(data)->Cleanup(); break;
case DpEventID::MessageReactionRemove: reinterpret_cast< DpMessageReactionRemoveEvent * >(data)->Cleanup(); break;
case DpEventID::GuildCreate: reinterpret_cast< DpGuildCreateEvent * >(data)->Cleanup(); break;
case DpEventID::ChannelCreate: reinterpret_cast< DpChannelCreateEvent * >(data)->Cleanup(); break;
case DpEventID::MessageReactionRemoveEmoji: reinterpret_cast< DpMessageReactionRemoveEmojiEvent * >(data)->Cleanup(); break;
case DpEventID::MessageDeleteBulk: reinterpret_cast< DpMessageDeleteBulkEvent * >(data)->Cleanup(); break;
case DpEventID::GuildRoleUpdate: reinterpret_cast< DpGuildRoleUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildRoleDelete: reinterpret_cast< DpGuildRoleDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ChannelPinsUpdate: reinterpret_cast< DpChannelPinsUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::MessageReactionRemoveAll: reinterpret_cast< DpMessageReactionRemoveAllEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceServerUpdate: reinterpret_cast< DpVoiceServerUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildEmojisUpdate: reinterpret_cast< DpGuildEmojisUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildStickersUpdate: reinterpret_cast< DpGuildStickersUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::PresenceUpdate: reinterpret_cast< DpPresenceUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::WebhooksUpdate: reinterpret_cast< DpWebhooksUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildMemberAdd: reinterpret_cast< DpGuildMemberAddEvent * >(data)->Cleanup(); break;
case DpEventID::InviteDelete: reinterpret_cast< DpInviteDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::GuildUpdate: reinterpret_cast< DpGuildUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildIntegrationsUpdate: reinterpret_cast< DpGuildIntegrationsUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildMemberUpdate: reinterpret_cast< DpGuildMemberUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::ApplicationCommandUpdate: reinterpret_cast< DpApplicationCommandUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::InviteCreate: reinterpret_cast< DpInviteCreateEvent * >(data)->Cleanup(); break;
case DpEventID::MessageUpdate: reinterpret_cast< DpMessageUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::UserUpdate: reinterpret_cast< DpUserUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::MessageCreate: reinterpret_cast< DpMessageCreateEvent * >(data)->Cleanup(); break;
case DpEventID::GuildBanAdd: reinterpret_cast< DpGuildBanAddEvent * >(data)->Cleanup(); break;
case DpEventID::GuildBanRemove: reinterpret_cast< DpGuildBanRemoveEvent * >(data)->Cleanup(); break;
case DpEventID::IntegrationCreate: reinterpret_cast< DpIntegrationCreateEvent * >(data)->Cleanup(); break;
case DpEventID::IntegrationUpdate: reinterpret_cast< DpIntegrationUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::IntegrationDelete: reinterpret_cast< DpIntegrationDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadCreate: reinterpret_cast< DpThreadCreateEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadUpdate: reinterpret_cast< DpThreadUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadDelete: reinterpret_cast< DpThreadDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadListSync: reinterpret_cast< DpThreadListSyncEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadMemberUpdate: reinterpret_cast< DpThreadMemberUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::ThreadMembersUpdate: reinterpret_cast< DpThreadMembersUpdateEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceBufferSend: reinterpret_cast< DpVoiceBufferSendEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceUserTalking: reinterpret_cast< DpVoiceUserTalkingEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceReady: reinterpret_cast< DpVoiceReadyEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceReceive: reinterpret_cast< DpVoiceReceiveEvent * >(data)->Cleanup(); break;
case DpEventID::VoiceTrackMarker: reinterpret_cast< DpVoiceTrackMarkerEvent * >(data)->Cleanup(); break;
case DpEventID::StageInstanceCreate: reinterpret_cast< DpStageInstanceCreateEvent * >(data)->Cleanup(); break;
case DpEventID::StageInstanceDelete: reinterpret_cast< DpStageInstanceDeleteEvent * >(data)->Cleanup(); break;
case DpEventID::Max: // Fall through
default: assert(0); return;
}

View File

@ -265,7 +265,7 @@ struct DpCluster : public SqChainedInstances< DpCluster >
*/
DpCluster & SetPresence(const DpPresence & p)
{
mC->set_presence(p);
mC->set_presence(p.Valid());
return *this;
}

View File

@ -11,10 +11,67 @@
namespace SqMod {
// ------------------------------------------------------------------------------------------------
SQMOD_DECL_TYPENAME(SqDppVoiceStateUpdateEventEvent, _SC("SqDppVoiceStateUpdateEventEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildJoinRequestDeleteEvent, _SC("SqDppGuildJoinRequestDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceStateUpdateEvent, _SC("SqDppVoiceStateUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppLogEvent, _SC("SqDppLogEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildJoinRequestDeleteEvent, _SC("SqDppGuildJoinRequestDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppInteractionCreateEvent, _SC("SqDppInteractionCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppButtonClickEvent, _SC("SqDppButtonClickEvent"))
SQMOD_DECL_TYPENAME(SqDppSelectClickEvent, _SC("SqDppSelectClickEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildDeleteEvent, _SC("SqDppGuildDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppChannelDeleteEvent, _SC("SqDppChannelDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppChannelUpdateEvent, _SC("SqDppChannelUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppReadyEvent, _SC("SqDppReadyEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageDeleteEvent, _SC("SqDppMessageDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppApplicationCommandDeleteEvent, _SC("SqDppApplicationCommandDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildMemberRemoveEvent, _SC("SqDppGuildMemberRemoveEvent"))
SQMOD_DECL_TYPENAME(SqDppApplicationCommandCreateEvent, _SC("SqDppApplicationCommandCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppResumedEvent, _SC("SqDppResumedEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildRoleCreateEvent, _SC("SqDppGuildRoleCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppTypingStartEvent, _SC("SqDppTypingStartEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageReactionAddEvent, _SC("SqDppMessageReactionAddEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildMembersChunkEvent, _SC("SqDppGuildMembersChunkEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageReactionRemoveEvent, _SC("SqDppMessageReactionRemoveEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildCreateEvent, _SC("SqDppGuildCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppChannelCreateEvent, _SC("SqDppChannelCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageReactionRemoveEmojiEvent, _SC("SqDppMessageReactionRemoveEmojiEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageDeleteBulkEvent, _SC("SqDppMessageDeleteBulkEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildRoleUpdateEvent, _SC("SqDppGuildRoleUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildRoleDeleteEvent, _SC("SqDppGuildRoleDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppChannelPinsUpdateEvent, _SC("SqDppChannelPinsUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageReactionRemoveAllEvent, _SC("SqDppMessageReactionRemoveAllEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceServerUpdateEvent, _SC("SqDppVoiceServerUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildEmojisUpdateEvent, _SC("SqDppGuildEmojisUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildStickersUpdateEvent, _SC("SqDppGuildStickersUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppPresenceUpdateEvent, _SC("SqDppPresenceUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppWebhooksUpdateEvent, _SC("SqDppWebhooksUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildMemberAddEvent, _SC("SqDppGuildMemberAddEvent"))
SQMOD_DECL_TYPENAME(SqDppInviteDeleteEvent, _SC("SqDppInviteDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildUpdateEvent, _SC("SqDppGuildUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildIntegrationsUpdateEvent, _SC("SqDppGuildIntegrationsUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildMemberUpdateEvent, _SC("SqDppGuildMemberUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppApplicationCommandUpdateEvent, _SC("SqDppApplicationCommandUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppInviteCreateEvent, _SC("SqDppInviteCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageUpdateEvent, _SC("SqDppMessageUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppUserUpdateEvent, _SC("SqDppUserUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppMessageCreateEvent, _SC("SqDppMessageCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildBanAddEvent, _SC("SqDppGuildBanAddEvent"))
SQMOD_DECL_TYPENAME(SqDppGuildBanRemoveEvent, _SC("SqDppGuildBanRemoveEvent"))
SQMOD_DECL_TYPENAME(SqDppIntegrationCreateEvent, _SC("SqDppIntegrationCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppIntegrationUpdateEvent, _SC("SqDppIntegrationUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppIntegrationDeleteEvent, _SC("SqDppIntegrationDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadCreateEvent, _SC("SqDppThreadCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadUpdateEvent, _SC("SqDppThreadUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadDeleteEvent, _SC("SqDppThreadDeleteEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadListSyncEvent, _SC("SqDppThreadListSyncEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadMemberUpdateEvent, _SC("SqDppThreadMemberUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppThreadMembersUpdateEvent, _SC("SqDppThreadMembersUpdateEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceBufferSendEvent, _SC("SqDppVoiceBufferSendEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceUserTalkingEvent, _SC("SqDppVoiceUserTalkingEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceReadyEvent, _SC("SqDppVoiceReadyEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceReceiveEvent, _SC("SqDppVoiceReceiveEvent"))
SQMOD_DECL_TYPENAME(SqDppVoiceTrackMarkerEvent, _SC("SqDppVoiceTrackMarkerEvent"))
SQMOD_DECL_TYPENAME(SqDppStageInstanceCreateEvent, _SC("SqDppStageInstanceCreateEvent"))
SQMOD_DECL_TYPENAME(SqDppStageInstanceDeleteEvent, _SC("SqDppStageInstanceDeleteEvent"))
// ------------------------------------------------------------------------------------------------
const std::array< const char *, static_cast< size_t >(DpEventID::Max) > DpEventID::NAME{
@ -86,9 +143,9 @@ void Register_DPPEv(HSQUIRRELVM vm, Table & ns)
{
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceStateUpdate"),
Class< DpVoiceStateUpdateEvent, NoConstructor< DpVoiceStateUpdateEvent > >(vm, SqDppVoiceStateUpdateEventEvent::Str)
Class< DpVoiceStateUpdateEvent, NoConstructor< DpVoiceStateUpdateEvent > >(vm, SqDppVoiceStateUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceStateUpdateEventEvent::Fn)
.SquirrelFunc(_SC("_typename"), &SqDppVoiceStateUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceStateUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("State"), &DpVoiceStateUpdateEvent::GetState)
@ -105,6 +162,71 @@ void Register_DPPEv(HSQUIRRELVM vm, Table & ns)
.Prop(_SC("Message"), &DpLogEvent::GetMessage)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildJoinRequestDelete"),
Class< DpGuildJoinRequestDeleteEvent, NoConstructor< DpGuildJoinRequestDeleteEvent > >(vm, SqDppGuildJoinRequestDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildJoinRequestDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpGuildJoinRequestDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildJoinRequestDeleteEvent::GetRawEvent)
.Prop(_SC("GuildID"), &DpGuildJoinRequestDeleteEvent::GetGuildID)
.Prop(_SC("UserID"), &DpGuildJoinRequestDeleteEvent::GetUserID)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("InteractionCreate"),
Class< DpInteractionCreateEvent, NoConstructor< DpInteractionCreateEvent > >(vm, SqDppInteractionCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppInteractionCreateEvent::Fn)
.Func(_SC("_tostring"), &DpInteractionCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpInteractionCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ButtonClick"),
Class< DpButtonClickEvent, NoConstructor< DpButtonClickEvent > >(vm, SqDppButtonClickEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppButtonClickEvent::Fn)
.Func(_SC("_tostring"), &DpButtonClickEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpButtonClickEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("SelectClick"),
Class< DpSelectClickEvent, NoConstructor< DpSelectClickEvent > >(vm, SqDppSelectClickEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppSelectClickEvent::Fn)
.Func(_SC("_tostring"), &DpSelectClickEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpSelectClickEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildDelete"),
Class< DpGuildDeleteEvent, NoConstructor< DpGuildDeleteEvent > >(vm, SqDppGuildDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpGuildDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ChannelDelete"),
Class< DpChannelDeleteEvent, NoConstructor< DpChannelDeleteEvent > >(vm, SqDppChannelDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppChannelDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpChannelDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpChannelDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ChannelUpdate"),
Class< DpChannelUpdateEvent, NoConstructor< DpChannelUpdateEvent > >(vm, SqDppChannelUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppChannelUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpChannelUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpChannelUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Ready"),
Class< DpReadyEvent, NoConstructor< DpReadyEvent > >(vm, SqDppReadyEvent::Str)
// Meta-methods
@ -116,15 +238,463 @@ void Register_DPPEv(HSQUIRRELVM vm, Table & ns)
.Prop(_SC("ShardID"), &DpReadyEvent::GetShardID)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildJoinRequestDelete"),
Class< DpGuildJoinRequestDeleteEvent, NoConstructor< DpGuildJoinRequestDeleteEvent > >(vm, SqDppGuildJoinRequestDeleteEvent::Str)
ns.Bind(_SC("MessageDelete"),
Class< DpMessageDeleteEvent, NoConstructor< DpMessageDeleteEvent > >(vm, SqDppMessageDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildJoinRequestDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpGuildJoinRequestDeleteEvent::GetRawEvent)
.SquirrelFunc(_SC("_typename"), &SqDppMessageDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpMessageDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildJoinRequestDeleteEvent::GetRawEvent)
.Prop(_SC("GuildID"), &DpGuildJoinRequestDeleteEvent::GetGuildID)
.Prop(_SC("UserID"), &DpGuildJoinRequestDeleteEvent::GetUserID)
.Prop(_SC("RawEvent"), &DpMessageDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ApplicationCommandDelete"),
Class< DpApplicationCommandDeleteEvent, NoConstructor< DpApplicationCommandDeleteEvent > >(vm, SqDppApplicationCommandDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppApplicationCommandDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpApplicationCommandDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpApplicationCommandDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildMemberRemove"),
Class< DpGuildMemberRemoveEvent, NoConstructor< DpGuildMemberRemoveEvent > >(vm, SqDppGuildMemberRemoveEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildMemberRemoveEvent::Fn)
.Func(_SC("_tostring"), &DpGuildMemberRemoveEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildMemberRemoveEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ApplicationCommandCreate"),
Class< DpApplicationCommandCreateEvent, NoConstructor< DpApplicationCommandCreateEvent > >(vm, SqDppApplicationCommandCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppApplicationCommandCreateEvent::Fn)
.Func(_SC("_tostring"), &DpApplicationCommandCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpApplicationCommandCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Resumed"),
Class< DpResumedEvent, NoConstructor< DpResumedEvent > >(vm, SqDppResumedEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppResumedEvent::Fn)
.Func(_SC("_tostring"), &DpResumedEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpResumedEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildRoleCreate"),
Class< DpGuildRoleCreateEvent, NoConstructor< DpGuildRoleCreateEvent > >(vm, SqDppGuildRoleCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildRoleCreateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildRoleCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildRoleCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("TypingStart"),
Class< DpTypingStartEvent, NoConstructor< DpTypingStartEvent > >(vm, SqDppTypingStartEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppTypingStartEvent::Fn)
.Func(_SC("_tostring"), &DpTypingStartEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpTypingStartEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageReactionAdd"),
Class< DpMessageReactionAddEvent, NoConstructor< DpMessageReactionAddEvent > >(vm, SqDppMessageReactionAddEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageReactionAddEvent::Fn)
.Func(_SC("_tostring"), &DpMessageReactionAddEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageReactionAddEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildMembersChunk"),
Class< DpGuildMembersChunkEvent, NoConstructor< DpGuildMembersChunkEvent > >(vm, SqDppGuildMembersChunkEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildMembersChunkEvent::Fn)
.Func(_SC("_tostring"), &DpGuildMembersChunkEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildMembersChunkEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageReactionRemove"),
Class< DpMessageReactionRemoveEvent, NoConstructor< DpMessageReactionRemoveEvent > >(vm, SqDppMessageReactionRemoveEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageReactionRemoveEvent::Fn)
.Func(_SC("_tostring"), &DpMessageReactionRemoveEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageReactionRemoveEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildCreate"),
Class< DpGuildCreateEvent, NoConstructor< DpGuildCreateEvent > >(vm, SqDppGuildCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildCreateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ChannelCreate"),
Class< DpChannelCreateEvent, NoConstructor< DpChannelCreateEvent > >(vm, SqDppChannelCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppChannelCreateEvent::Fn)
.Func(_SC("_tostring"), &DpChannelCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpChannelCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageReactionRemoveEmoji"),
Class< DpMessageReactionRemoveEmojiEvent, NoConstructor< DpMessageReactionRemoveEmojiEvent > >(vm, SqDppMessageReactionRemoveEmojiEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageReactionRemoveEmojiEvent::Fn)
.Func(_SC("_tostring"), &DpMessageReactionRemoveEmojiEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageReactionRemoveEmojiEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageDeleteBulk"),
Class< DpMessageDeleteBulkEvent, NoConstructor< DpMessageDeleteBulkEvent > >(vm, SqDppMessageDeleteBulkEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageDeleteBulkEvent::Fn)
.Func(_SC("_tostring"), &DpMessageDeleteBulkEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageDeleteBulkEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildRoleUpdate"),
Class< DpGuildRoleUpdateEvent, NoConstructor< DpGuildRoleUpdateEvent > >(vm, SqDppGuildRoleUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildRoleUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildRoleUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildRoleUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildRoleDelete"),
Class< DpGuildRoleDeleteEvent, NoConstructor< DpGuildRoleDeleteEvent > >(vm, SqDppGuildRoleDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildRoleDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpGuildRoleDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildRoleDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ChannelPinsUpdate"),
Class< DpChannelPinsUpdateEvent, NoConstructor< DpChannelPinsUpdateEvent > >(vm, SqDppChannelPinsUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppChannelPinsUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpChannelPinsUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpChannelPinsUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageReactionRemoveAll"),
Class< DpMessageReactionRemoveAllEvent, NoConstructor< DpMessageReactionRemoveAllEvent > >(vm, SqDppMessageReactionRemoveAllEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageReactionRemoveAllEvent::Fn)
.Func(_SC("_tostring"), &DpMessageReactionRemoveAllEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageReactionRemoveAllEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceServerUpdate"),
Class< DpVoiceServerUpdateEvent, NoConstructor< DpVoiceServerUpdateEvent > >(vm, SqDppVoiceServerUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceServerUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceServerUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceServerUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildEmojisUpdate"),
Class< DpGuildEmojisUpdateEvent, NoConstructor< DpGuildEmojisUpdateEvent > >(vm, SqDppGuildEmojisUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildEmojisUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildEmojisUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildEmojisUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildStickersUpdate"),
Class< DpGuildStickersUpdateEvent, NoConstructor< DpGuildStickersUpdateEvent > >(vm, SqDppGuildStickersUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildStickersUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildStickersUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildStickersUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("PresenceUpdate"),
Class< DpPresenceUpdateEvent, NoConstructor< DpPresenceUpdateEvent > >(vm, SqDppPresenceUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppPresenceUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpPresenceUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpPresenceUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("WebhooksUpdate"),
Class< DpWebhooksUpdateEvent, NoConstructor< DpWebhooksUpdateEvent > >(vm, SqDppWebhooksUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppWebhooksUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpWebhooksUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpWebhooksUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildMemberAdd"),
Class< DpGuildMemberAddEvent, NoConstructor< DpGuildMemberAddEvent > >(vm, SqDppGuildMemberAddEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildMemberAddEvent::Fn)
.Func(_SC("_tostring"), &DpGuildMemberAddEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildMemberAddEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("InviteDelete"),
Class< DpInviteDeleteEvent, NoConstructor< DpInviteDeleteEvent > >(vm, SqDppInviteDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppInviteDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpInviteDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpInviteDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildUpdate"),
Class< DpGuildUpdateEvent, NoConstructor< DpGuildUpdateEvent > >(vm, SqDppGuildUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildIntegrationsUpdate"),
Class< DpGuildIntegrationsUpdateEvent, NoConstructor< DpGuildIntegrationsUpdateEvent > >(vm, SqDppGuildIntegrationsUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildIntegrationsUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildIntegrationsUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildIntegrationsUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildMemberUpdate"),
Class< DpGuildMemberUpdateEvent, NoConstructor< DpGuildMemberUpdateEvent > >(vm, SqDppGuildMemberUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildMemberUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpGuildMemberUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildMemberUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ApplicationCommandUpdate"),
Class< DpApplicationCommandUpdateEvent, NoConstructor< DpApplicationCommandUpdateEvent > >(vm, SqDppApplicationCommandUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppApplicationCommandUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpApplicationCommandUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpApplicationCommandUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("InviteCreate"),
Class< DpInviteCreateEvent, NoConstructor< DpInviteCreateEvent > >(vm, SqDppInviteCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppInviteCreateEvent::Fn)
.Func(_SC("_tostring"), &DpInviteCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpInviteCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageUpdate"),
Class< DpMessageUpdateEvent, NoConstructor< DpMessageUpdateEvent > >(vm, SqDppMessageUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpMessageUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("UserUpdate"),
Class< DpUserUpdateEvent, NoConstructor< DpUserUpdateEvent > >(vm, SqDppUserUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppUserUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpUserUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpUserUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("MessageCreate"),
Class< DpMessageCreateEvent, NoConstructor< DpMessageCreateEvent > >(vm, SqDppMessageCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppMessageCreateEvent::Fn)
.Func(_SC("_tostring"), &DpMessageCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpMessageCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildBanAdd"),
Class< DpGuildBanAddEvent, NoConstructor< DpGuildBanAddEvent > >(vm, SqDppGuildBanAddEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildBanAddEvent::Fn)
.Func(_SC("_tostring"), &DpGuildBanAddEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildBanAddEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildBanRemove"),
Class< DpGuildBanRemoveEvent, NoConstructor< DpGuildBanRemoveEvent > >(vm, SqDppGuildBanRemoveEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildBanRemoveEvent::Fn)
.Func(_SC("_tostring"), &DpGuildBanRemoveEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpGuildBanRemoveEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("IntegrationCreate"),
Class< DpIntegrationCreateEvent, NoConstructor< DpIntegrationCreateEvent > >(vm, SqDppIntegrationCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppIntegrationCreateEvent::Fn)
.Func(_SC("_tostring"), &DpIntegrationCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpIntegrationCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("IntegrationUpdate"),
Class< DpIntegrationUpdateEvent, NoConstructor< DpIntegrationUpdateEvent > >(vm, SqDppIntegrationUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppIntegrationUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpIntegrationUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpIntegrationUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("IntegrationDelete"),
Class< DpIntegrationDeleteEvent, NoConstructor< DpIntegrationDeleteEvent > >(vm, SqDppIntegrationDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppIntegrationDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpIntegrationDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpIntegrationDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadCreate"),
Class< DpThreadCreateEvent, NoConstructor< DpThreadCreateEvent > >(vm, SqDppThreadCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadCreateEvent::Fn)
.Func(_SC("_tostring"), &DpThreadCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadUpdate"),
Class< DpThreadUpdateEvent, NoConstructor< DpThreadUpdateEvent > >(vm, SqDppThreadUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpThreadUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadDelete"),
Class< DpThreadDeleteEvent, NoConstructor< DpThreadDeleteEvent > >(vm, SqDppThreadDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpThreadDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadListSync"),
Class< DpThreadListSyncEvent, NoConstructor< DpThreadListSyncEvent > >(vm, SqDppThreadListSyncEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadListSyncEvent::Fn)
.Func(_SC("_tostring"), &DpThreadListSyncEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadListSyncEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadMemberUpdate"),
Class< DpThreadMemberUpdateEvent, NoConstructor< DpThreadMemberUpdateEvent > >(vm, SqDppThreadMemberUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadMemberUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpThreadMemberUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadMemberUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("ThreadMembersUpdate"),
Class< DpThreadMembersUpdateEvent, NoConstructor< DpThreadMembersUpdateEvent > >(vm, SqDppThreadMembersUpdateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppThreadMembersUpdateEvent::Fn)
.Func(_SC("_tostring"), &DpThreadMembersUpdateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpThreadMembersUpdateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceBufferSend"),
Class< DpVoiceBufferSendEvent, NoConstructor< DpVoiceBufferSendEvent > >(vm, SqDppVoiceBufferSendEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceBufferSendEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceBufferSendEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceBufferSendEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceUserTalking"),
Class< DpVoiceUserTalkingEvent, NoConstructor< DpVoiceUserTalkingEvent > >(vm, SqDppVoiceUserTalkingEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceUserTalkingEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceUserTalkingEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceUserTalkingEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceReady"),
Class< DpVoiceReadyEvent, NoConstructor< DpVoiceReadyEvent > >(vm, SqDppVoiceReadyEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceReadyEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceReadyEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceReadyEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceReceive"),
Class< DpVoiceReceiveEvent, NoConstructor< DpVoiceReceiveEvent > >(vm, SqDppVoiceReceiveEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceReceiveEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceReceiveEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceReceiveEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("VoiceTrackMarker"),
Class< DpVoiceTrackMarkerEvent, NoConstructor< DpVoiceTrackMarkerEvent > >(vm, SqDppVoiceTrackMarkerEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppVoiceTrackMarkerEvent::Fn)
.Func(_SC("_tostring"), &DpVoiceTrackMarkerEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpVoiceTrackMarkerEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("StageInstanceCreate"),
Class< DpStageInstanceCreateEvent, NoConstructor< DpStageInstanceCreateEvent > >(vm, SqDppStageInstanceCreateEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppStageInstanceCreateEvent::Fn)
.Func(_SC("_tostring"), &DpStageInstanceCreateEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpStageInstanceCreateEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("StageInstanceDelete"),
Class< DpStageInstanceDeleteEvent, NoConstructor< DpStageInstanceDeleteEvent > >(vm, SqDppStageInstanceDeleteEvent::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppStageInstanceDeleteEvent::Fn)
.Func(_SC("_tostring"), &DpStageInstanceDeleteEvent::GetRawEvent)
// Member Properties
.Prop(_SC("RawEvent"), &DpStageInstanceDeleteEvent::GetRawEvent)
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordEvent"), Enumeration(vm)

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,6 @@
// ------------------------------------------------------------------------------------------------
#include "Library/DPPTy.hpp"
// ------------------------------------------------------------------------------------------------
#include <cstdio>
// ------------------------------------------------------------------------------------------------
#include <sqratConst.h>
@ -12,11 +9,14 @@ namespace SqMod {
// ------------------------------------------------------------------------------------------------
SQMOD_DECL_TYPENAME(SqDppCachePolicy, _SC("SqDppCachePolicy"))
SQMOD_DECL_TYPENAME(SqDppUptime, _SC("SqDppUptime"))
SQMOD_DECL_TYPENAME(SqDppIconHash, _SC("SqDppIconHash"))
SQMOD_DECL_TYPENAME(SqDppUptime, _SC("SqDppUptime"))
SQMOD_DECL_TYPENAME(SqDppActivity, _SC("SqDppActivity"))
SQMOD_DECL_TYPENAME(SqDppPresence, _SC("SqDppPresence"))
SQMOD_DECL_TYPENAME(SqDppVoiceState, _SC("SqDppVoiceState"))
SQMOD_DECL_TYPENAME(SqDppRole, _SC("SqDppRole"))
SQMOD_DECL_TYPENAME(SqDppUser, _SC("SqDppUser"))
SQMOD_DECL_TYPENAME(SqDppGuildMember, _SC("SqDppGuildMember"))
SQMOD_DECL_TYPENAME(SqDppGuild, _SC("SqDppGuild"))
// ------------------------------------------------------------------------------------------------
@ -75,7 +75,7 @@ void Register_DPPTy(HSQUIRRELVM vm, Table & ns)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Activity"),
Class< DpActivity >(vm, SqDppActivity::Str)
Class< DpActivity, NoCopy< DpActivity > >(vm, SqDppActivity::Str)
// Constructors
.Ctor()
.Ctor< SQInteger, StackStrF &, StackStrF &, StackStrF & >()
@ -100,12 +100,13 @@ void Register_DPPTy(HSQUIRRELVM vm, Table & ns)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Presence"),
Class< DpPresence >(vm, SqDppPresence::Str)
Class< DpPresence, NoCopy< DpPresence > >(vm, SqDppPresence::Str)
// Constructors
.Ctor()
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppPresence::Fn)
// Member Properties
.Prop(_SC("Valid"), &DpPresence::IsValid)
.Prop(_SC("UserID"), &DpPresence::GetUserID, &DpPresence::SetUserID)
.Prop(_SC("GuildID"), &DpPresence::GetGuildID, &DpPresence::SetGuildID)
.Prop(_SC("Flags"), &DpPresence::GetFlags, &DpPresence::SetFlags)
@ -132,126 +133,471 @@ void Register_DPPTy(HSQUIRRELVM vm, Table & ns)
.Func(_SC("_tojson"), &DpVoiceState::BuildJSON)
// Member Properties
.Prop(_SC("Valid"), &DpVoiceState::IsValid)
.Prop(_SC("JSON"), &DpVoiceState::BuildJSON)
.Prop(_SC("GuildID"), &DpVoiceState::GetGuildID)
.Prop(_SC("ChannelID"), &DpVoiceState::GetChannelID)
.Prop(_SC("UserID"), &DpVoiceState::GetUserID)
.Prop(_SC("SessionID"), &DpVoiceState::GetSessionID)
.Prop(_SC("Flags"), &DpVoiceState::GetFlags, &DpVoiceState::SetFlags)
.Prop(_SC("JSON"), &DpVoiceState::BuildJSON)
.Prop(_SC("Deaf"), &DpVoiceState::IsDeaf)
.Prop(_SC("Mute"), &DpVoiceState::IsMute)
.Prop(_SC("SelfMute"), &DpVoiceState::IsSelfMute)
.Prop(_SC("SelfDeaf"), &DpVoiceState::IsSelfDeaf)
.Prop(_SC("IsDeaf"), &DpVoiceState::IsDeaf)
.Prop(_SC("IsMute"), &DpVoiceState::IsMute)
.Prop(_SC("IsSelfMute"), &DpVoiceState::IsSelfMute)
.Prop(_SC("IsSelfDeaf"), &DpVoiceState::IsSelfDeaf)
.Prop(_SC("SelfStream"), &DpVoiceState::SelfStream)
.Prop(_SC("SelfVideo"), &DpVoiceState::SelfVideo)
.Prop(_SC("Supressed"), &DpVoiceState::IsSupressed)
.Prop(_SC("IsSupressed"), &DpVoiceState::IsSupressed)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Role"),
Class< DpRole, NoConstructor< DpRole > >(vm, SqDppRole::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppRole::Fn)
.Func(_SC("_tojson"), &DpRole::BuildJSON)
// Member Properties
.Prop(_SC("Valid"), &DpRole::IsValid)
.Prop(_SC("JSON"), &DpRole::BuildJSON)
.Prop(_SC("Name"), &DpRole::GetName)
.Prop(_SC("GuildID"), &DpRole::GetGuildID)
.Prop(_SC("Color"), &DpRole::GetColour)
.Prop(_SC("Colour"), &DpRole::GetColour)
.Prop(_SC("Position"), &DpRole::GetPosition)
.Prop(_SC("Permissions"), &DpRole::GetPermissions)
.Prop(_SC("Flags"), &DpRole::GetFlags)
.Prop(_SC("IntegrationID"), &DpRole::GetIntegrationID)
.Prop(_SC("BotID"), &DpRole::GetBotID)
.Prop(_SC("IsHoisted"), &DpRole::IsHoisted)
.Prop(_SC("IsMentionable"), &DpRole::IsMentionable)
.Prop(_SC("IsManaged"), &DpRole::IsManaged)
.Prop(_SC("CanCreateInstantInvite"), &DpRole::CanCreateInstantInvite)
.Prop(_SC("CanKickMembers"), &DpRole::CanKickMembers)
.Prop(_SC("CanBanMembers"), &DpRole::CanBanMembers)
.Prop(_SC("IsAdministrator"), &DpRole::IsAdministrator)
.Prop(_SC("CanManageChannels"), &DpRole::CanManageChannels)
.Prop(_SC("CanManageGuild"), &DpRole::CanManageGuild)
.Prop(_SC("CanAddReactions"), &DpRole::CanAddReactions)
.Prop(_SC("CanViewAuditLog"), &DpRole::CanViewAuditLog)
.Prop(_SC("IsPrioritySpeaker"), &DpRole::IsPrioritySpeaker)
.Prop(_SC("CanStream"), &DpRole::CanStream)
.Prop(_SC("CanViewChannel"), &DpRole::CanViewChannel)
.Prop(_SC("CanSendMessages"), &DpRole::CanSendMessages)
.Prop(_SC("CanSendTtsMessages"), &DpRole::CanSendTtsMessages)
.Prop(_SC("CanManageMessages"), &DpRole::CanManageMessages)
.Prop(_SC("CanEmbedLinks"), &DpRole::CanEmbedLinks)
.Prop(_SC("CanAttachFiles"), &DpRole::CanAttachFiles)
.Prop(_SC("CanReadMessageHistory"), &DpRole::CanReadMessageHistory)
.Prop(_SC("CanMentionEveryone"), &DpRole::CanMentionEveryone)
.Prop(_SC("CanUseExternalEmojis"), &DpRole::CanUseExternalEmojis)
.Prop(_SC("CanViewGuildInsights"), &DpRole::CanViewGuildInsights)
.Prop(_SC("CanConnect"), &DpRole::CanConnect)
.Prop(_SC("CanSpeak"), &DpRole::CanSpeak)
.Prop(_SC("CanMuteMembers"), &DpRole::CanMuteMembers)
.Prop(_SC("CanDeafenMembers"), &DpRole::CanDeafenMembers)
.Prop(_SC("CanMoveMembers"), &DpRole::CanMoveMembers)
.Prop(_SC("CanUseVAT"), &DpRole::CanUseVAT)
.Prop(_SC("CanChangeNickname"), &DpRole::CanChangeNickname)
.Prop(_SC("CanManageNicknames"), &DpRole::CanManageNicknames)
.Prop(_SC("CanManageRoles"), &DpRole::CanManageRoles)
.Prop(_SC("CanManageWebhooks"), &DpRole::CanManageWebhooks)
.Prop(_SC("CanManageEmojis"), &DpRole::CanManageEmojis)
.Prop(_SC("CanUseSlashCommands"), &DpRole::CanUseSlashCommands)
.Prop(_SC("HasRequestToSpeak"), &DpRole::HasRequestToSpeak)
.Prop(_SC("CanManageThreads"), &DpRole::CanManageThreads)
.Prop(_SC("HasUsePublicThreads"), &DpRole::HasUsePublicThreads)
.Prop(_SC("HasUsePrivateThreads"), &DpRole::HasUsePrivateThreads)
// Member Methods
.Func(_SC("BuildJSON"), &DpRole::BuildJSON_)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("User"),
Class< DpUser, NoConstructor< DpUser > >(vm, SqDppUser::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppUser::Fn)
// Member Properties
.Prop(_SC("Valid"), &DpUser::IsValid)
.Prop(_SC("Username"), &DpUser::GetUsername)
.Prop(_SC("Discriminator"), &DpUser::GetDiscriminator)
.Prop(_SC("Avatar"), &DpUser::GetAvatar)
.Prop(_SC("Flags"), &DpUser::GetFlags)
.Prop(_SC("RefCount"), &DpUser::GetRefCount)
.Prop(_SC("AvatarURL"), &DpUser::GetAvatarURL)
.Prop(_SC("IsBot"), &DpUser::IsBot)
.Prop(_SC("IsSystem"), &DpUser::IsSystem)
.Prop(_SC("IsMfaEnabled"), &DpUser::IsMfaEnabled)
.Prop(_SC("IsVerified"), &DpUser::IsVerified)
.Prop(_SC("HasNitroFull"), &DpUser::HasNitroFull)
.Prop(_SC("HasNitroClassic"), &DpUser::HasNitroClassic)
.Prop(_SC("IsDiscordEmployee"), &DpUser::IsDiscordEmployee)
.Prop(_SC("IsPartneredOwner"), &DpUser::IsPartneredOwner)
.Prop(_SC("HasHypesquadEvents"), &DpUser::HasHypesquadEvents)
.Prop(_SC("IsBughunter1"), &DpUser::IsBughunter1)
.Prop(_SC("IsHouseBravery"), &DpUser::IsHouseBravery)
.Prop(_SC("IsHouseBrilliance"), &DpUser::IsHouseBrilliance)
.Prop(_SC("IsHouseBalanace"), &DpUser::IsHouseBalanace)
.Prop(_SC("IsEarlySupporter"), &DpUser::IsEarlySupporter)
.Prop(_SC("IsTeamUser"), &DpUser::IsTeamUser)
.Prop(_SC("IsBughunter2"), &DpUser::IsBughunter2)
.Prop(_SC("IsVerifiedBot"), &DpUser::IsVerifiedBot)
.Prop(_SC("IsVerifiedBotDev"), &DpUser::IsVerifiedBotDev)
.Prop(_SC("IsCertifiedDoderator"), &DpUser::IsCertifiedDoderator)
.Prop(_SC("HasAnimatedIcon"), &DpUser::HasAnimatedIcon)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("GuildMember"),
Class< DpGuildMember, NoConstructor< DpGuildMember > >(vm, SqDppGuildMember::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuildMember::Fn)
.Func(_SC("_tojson"), &DpGuildMember::BuildJSON)
// Member Properties
.Prop(_SC("Valid"), &DpGuildMember::IsValid)
.Prop(_SC("JSON"), &DpGuildMember::BuildJSON)
.Prop(_SC("Nickname"), &DpGuildMember::GetNickname)
.Prop(_SC("GuildID"), &DpGuildMember::GetGuildID)
.Prop(_SC("UserID"), &DpGuildMember::GetUserID)
.Prop(_SC("JoinedAt"), &DpGuildMember::GetJoinedAt)
.Prop(_SC("PremiumSince"), &DpGuildMember::GetPremiumSince)
.Prop(_SC("Flags"), &DpGuildMember::GetFlags)
.Prop(_SC("IsDeaf"), &DpGuildMember::IsDeaf)
.Prop(_SC("IsMuted"), &DpGuildMember::IsMuted)
.Prop(_SC("IsPending"), &DpGuildMember::IsPending)
// Member Methods
.Func(_SC("GetRoles"), &DpGuildMember::GetRoles)
);
// --------------------------------------------------------------------------------------------
ns.Bind(_SC("Guild"),
Class< DpGuild, NoConstructor< DpGuild > >(vm, SqDppGuild::Str)
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SqDppGuild::Fn)
.Func(_SC("_tojson"), &DpGuild::BuildJSON)
// Member Properties
.Prop(_SC("Valid"), &DpGuild::IsValid)
.Prop(_SC("JSON"), &DpGuild::BuildJSON)
.Prop(_SC("ShardID"), &DpGuild::GetShardID)
.Prop(_SC("Flags"), &DpGuild::GetFlags)
.Prop(_SC("Name"), &DpGuild::GetName)
.Prop(_SC("Description"), &DpGuild::GetDescription)
.Prop(_SC("VanityUrlCode"), &DpGuild::GetVanityUrlCode)
.Prop(_SC("Icon"), &DpGuild::GetIcon)
.Prop(_SC("Splash"), &DpGuild::GetSplash)
.Prop(_SC("DiscoverySplash"), &DpGuild::GetDiscoverySplash)
.Prop(_SC("OwnerID"), &DpGuild::GetOwnerID)
.Prop(_SC("VoiceRegion"), &DpGuild::GetVoiceRegion)
.Prop(_SC("AfkChannelID"), &DpGuild::GetAfkChannelID)
.Prop(_SC("AfkTimeout"), &DpGuild::GetAfkTimeout)
.Prop(_SC("WidgetChannelID"), &DpGuild::GetWidgetChannelID)
.Prop(_SC("VerificationLevel"), &DpGuild::GetVerificationLevel)
.Prop(_SC("DefaultMessageNotifications"), &DpGuild::GetDefaultMessageNotifications)
.Prop(_SC("ExplicitContentFilter"), &DpGuild::GetExplicitContentFilter)
.Prop(_SC("MfaLevel"), &DpGuild::GetMfaLevel)
.Prop(_SC("ApplicationID"), &DpGuild::GetApplicationID)
.Prop(_SC("SystemChannelID"), &DpGuild::GetSystemChannelID)
.Prop(_SC("RulesChannelID"), &DpGuild::GetRulesChannelID)
.Prop(_SC("MemberCount"), &DpGuild::GetMemberCount)
.Prop(_SC("Banner"), &DpGuild::GetBanner)
.Prop(_SC("PremiumTier"), &DpGuild::GetPremiumTier)
.Prop(_SC("PremiumSubscriptionCount"), &DpGuild::GetPremiumSubscriptionCount)
.Prop(_SC("PublicUpdatesChannelID"), &DpGuild::GetPublicUpdatesChannelID)
.Prop(_SC("MaxVideoChannelUsers"), &DpGuild::GetMaxVideoChannelUsers)
.Prop(_SC("IsLarge"), &DpGuild::IsLarge)
.Prop(_SC("IsUnavailable"), &DpGuild::IsUnavailable)
.Prop(_SC("WidgetEnabled"), &DpGuild::WidgetEnabled)
.Prop(_SC("HasInviteSplash"), &DpGuild::HasInviteSplash)
.Prop(_SC("HasVipRegions"), &DpGuild::HasVipRegions)
.Prop(_SC("HasVanityURL"), &DpGuild::HasVanityURL)
.Prop(_SC("IsVerified"), &DpGuild::IsVerified)
.Prop(_SC("IsPartnered"), &DpGuild::IsPartnered)
.Prop(_SC("IsCommunity"), &DpGuild::IsCommunity)
.Prop(_SC("HasCommerce"), &DpGuild::HasCommerce)
.Prop(_SC("HasNews"), &DpGuild::HasNews)
.Prop(_SC("IsDiscoverable"), &DpGuild::IsDiscoverable)
.Prop(_SC("IsFeatureable"), &DpGuild::IsFeatureable)
.Prop(_SC("HasAnimatedIcon"), &DpGuild::HasAnimatedIcon)
.Prop(_SC("BasBanner"), &DpGuild::BasBanner)
.Prop(_SC("WelcomeScreenEnabled"), &DpGuild::WelcomeScreenEnabled)
.Prop(_SC("HasMemberVerificationGate"), &DpGuild::HasMemberVerificationGate)
.Prop(_SC("IsPreviewEnabled"), &DpGuild::IsPreviewEnabled)
.Prop(_SC("HasAnimatedIconHash"), &DpGuild::HasAnimatedIconHash)
// Member Methods
.Func(_SC("BuildJSON"), &DpGuild::BuildJSON_)
.Func(_SC("GetRoles"), &DpGuild::GetRoles)
.Func(_SC("GetChannels"), &DpGuild::GetChannels)
.Func(_SC("GetThreads"), &DpGuild::GetThreads)
.Func(_SC("GetMembers"), &DpGuild::GetMembers)
.Func(_SC("GetVoiceMembers"), &DpGuild::GetVoiceMembers)
.Func(_SC("GetEmojis"), &DpGuild::GetEmojis)
.Func(_SC("RehashMembers"), &DpGuild::RehashMembers)
.Func(_SC("ConnectMemberVoice"), &DpGuild::ConnectMemberVoice)
);
}
// ------------------------------------------------------------------------------------------------
void Register_DPPConst(HSQUIRRELVM vm, Table & ns)
static const EnumElement g_DpLogLevelEnum[] = {
{_SC("Trace"), static_cast< SQInteger >(dpp::ll_trace)},
{_SC("Debug"), static_cast< SQInteger >(dpp::ll_debug)},
{_SC("Info"), static_cast< SQInteger >(dpp::ll_info)},
{_SC("Warning"), static_cast< SQInteger >(dpp::ll_warning)},
{_SC("Error"), static_cast< SQInteger >(dpp::ll_error)},
{_SC("Critical"), static_cast< SQInteger >(dpp::ll_critical)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpImageTypeEnum[] = {
{_SC("PNG"), static_cast< SQInteger >(dpp::i_png)},
{_SC("JPG"), static_cast< SQInteger >(dpp::i_jpg)},
{_SC("GIF"), static_cast< SQInteger >(dpp::i_gif)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpCachePolicyEnum[] = {
{_SC("Aggressive"), static_cast< SQInteger >(dpp::cp_aggressive)},
{_SC("Lazy"), static_cast< SQInteger >(dpp::cp_lazy)},
{_SC("None"), static_cast< SQInteger >(dpp::cp_none)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpClusterIntentsEnum[] = {
{_SC("Guilds"), static_cast< SQInteger >(dpp::i_guilds)},
{_SC("GuildMembers"), static_cast< SQInteger >(dpp::i_guild_members)},
{_SC("GuildBans"), static_cast< SQInteger >(dpp::i_guild_bans)},
{_SC("GuildEmojis"), static_cast< SQInteger >(dpp::i_guild_emojis)},
{_SC("GuildIntegrations"), static_cast< SQInteger >(dpp::i_guild_integrations)},
{_SC("GuildWebhooks"), static_cast< SQInteger >(dpp::i_guild_webhooks)},
{_SC("GuildInvites"), static_cast< SQInteger >(dpp::i_guild_invites)},
{_SC("GuildVoiceStates"), static_cast< SQInteger >(dpp::i_guild_voice_states)},
{_SC("GuildPresences"), static_cast< SQInteger >(dpp::i_guild_presences)},
{_SC("GuildMessages"), static_cast< SQInteger >(dpp::i_guild_messages)},
{_SC("GuildMessageReactions"), static_cast< SQInteger >(dpp::i_guild_message_reactions)},
{_SC("GuildMessageTyping"), static_cast< SQInteger >(dpp::i_guild_message_typing)},
{_SC("DirectMessages"), static_cast< SQInteger >(dpp::i_direct_messages)},
{_SC("DirectMessageReactions"), static_cast< SQInteger >(dpp::i_direct_message_reactions)},
{_SC("DirectMessageTyping"), static_cast< SQInteger >(dpp::i_direct_message_typing)},
{_SC("Default"), static_cast< SQInteger >(dpp::i_default_intents)},
{_SC("Privileged"), static_cast< SQInteger >(dpp::i_privileged_intents)},
{_SC("All"), static_cast< SQInteger >(dpp::i_all_intents)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpPresenceFlagsEnum[] = {
{_SC("DesktopOnline"), static_cast< SQInteger >(dpp::p_desktop_online)},
{_SC("DesktopDND"), static_cast< SQInteger >(dpp::p_desktop_dnd)},
{_SC("DesktopIdle"), static_cast< SQInteger >(dpp::p_desktop_idle)},
{_SC("WebWnline"), static_cast< SQInteger >(dpp::p_web_online)},
{_SC("WebDND"), static_cast< SQInteger >(dpp::p_web_dnd)},
{_SC("WebIdle"), static_cast< SQInteger >(dpp::p_web_idle)},
{_SC("MobileOnline"), static_cast< SQInteger >(dpp::p_mobile_online)},
{_SC("MobileDND"), static_cast< SQInteger >(dpp::p_mobile_dnd)},
{_SC("MobileIdle"), static_cast< SQInteger >(dpp::p_mobile_idle)},
{_SC("StatusOnline"), static_cast< SQInteger >(dpp::p_status_online)},
{_SC("StatusDND"), static_cast< SQInteger >(dpp::p_status_dnd)},
{_SC("StatusIdle"), static_cast< SQInteger >(dpp::p_status_idle)},
// Helper bit-shift flags
{_SC("BitShiftDesktop"), static_cast< SQInteger >(PF_SHIFT_DESKTOP)},
{_SC("BitShiftWeb"), static_cast< SQInteger >(PF_SHIFT_WEB)},
{_SC("BitShiftMobile"), static_cast< SQInteger >(PF_SHIFT_MOBILE)},
{_SC("BitShiftMain"), static_cast< SQInteger >(PF_SHIFT_MAIN)},
{_SC("BitStatusMask"), static_cast< SQInteger >(PF_STATUS_MASK)},
{_SC("BitClearDesktop"), static_cast< SQInteger >(PF_CLEAR_DESKTOP)},
{_SC("BitClearWeb"), static_cast< SQInteger >(PF_CLEAR_WEB)},
{_SC("BitClearMobile"), static_cast< SQInteger >(PF_CLEAR_MOBILE)},
{_SC("BitClearStatus"), static_cast< SQInteger >(PF_CLEAR_STATUS)},
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpPresenceStatusEnum[] = {
{_SC("Offline"), static_cast< SQInteger >(dpp::ps_offline)},
{_SC("Online"), static_cast< SQInteger >(dpp::ps_online)},
{_SC("DND"), static_cast< SQInteger >(dpp::ps_dnd)},
{_SC("Idle"), static_cast< SQInteger >(dpp::ps_idle)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpDesktopStatusBitsEnum[] = {
{_SC("ShiftDesktop"), static_cast< SQInteger >(PF_SHIFT_DESKTOP)},
{_SC("ShiftWeb"), static_cast< SQInteger >(PF_SHIFT_WEB)},
{_SC("ShiftMobile"), static_cast< SQInteger >(PF_SHIFT_MOBILE)},
{_SC("ShiftMain"), static_cast< SQInteger >(PF_SHIFT_MAIN)},
{_SC("StatusMask"), static_cast< SQInteger >(PF_STATUS_MASK)},
{_SC("ClearDesktop"), static_cast< SQInteger >(PF_CLEAR_DESKTOP)},
{_SC("ClearWeb"), static_cast< SQInteger >(PF_CLEAR_WEB)},
{_SC("ClearMobile"), static_cast< SQInteger >(PF_CLEAR_MOBILE)},
{_SC("ClearStatus"), static_cast< SQInteger >(PF_CLEAR_STATUS)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpActivityTypeEnum[] = {
{_SC("Game"), static_cast< SQInteger >(dpp::at_game)},
{_SC("Streaming"), static_cast< SQInteger >(dpp::at_streaming)},
{_SC("Listening"), static_cast< SQInteger >(dpp::at_listening)},
{_SC("Custom"), static_cast< SQInteger >(dpp::at_custom)},
{_SC("Competing"), static_cast< SQInteger >(dpp::at_competing)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpActivityFlagsEnum[] = {
{_SC("Instance"), static_cast< SQInteger >(dpp::af_instance)},
{_SC("Join"), static_cast< SQInteger >(dpp::af_join)},
{_SC("Spectate"), static_cast< SQInteger >(dpp::af_spectate)},
{_SC("JoinRequest"), static_cast< SQInteger >(dpp::af_join_request)},
{_SC("Sync"), static_cast< SQInteger >(dpp::af_sync)},
{_SC("Play"), static_cast< SQInteger >(dpp::af_play)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpVoiceStateFlagsEnum[] = {
{_SC("Deaf"), static_cast< SQInteger >(dpp::vs_deaf)},
{_SC("Mute"), static_cast< SQInteger >(dpp::vs_mute)},
{_SC("SelfMute"), static_cast< SQInteger >(dpp::vs_self_mute)},
{_SC("SelfDeaf"), static_cast< SQInteger >(dpp::vs_self_deaf)},
{_SC("SelfStream"), static_cast< SQInteger >(dpp::vs_self_stream)},
{_SC("SelfVideo"), static_cast< SQInteger >(dpp::vs_self_video)},
{_SC("Supress"), static_cast< SQInteger >(dpp::vs_supress)},
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpRoleFlagsEnum[] = {
{_SC("Hoist"), static_cast< SQInteger >(dpp::r_hoist)},
{_SC("Managed"), static_cast< SQInteger >(dpp::r_managed)},
{_SC("Mentionable"), static_cast< SQInteger >(dpp::r_mentionable)},
{_SC("PremiumSubscriber"), static_cast< SQInteger >(dpp::r_premium_subscriber)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpRolePermissionsEnum[] = {
{_SC("CreateInstantInvite"), static_cast< SQInteger >(dpp::p_create_instant_invite)},
{_SC("KickMembers"), static_cast< SQInteger >(dpp::p_kick_members)},
{_SC("BanMembers"), static_cast< SQInteger >(dpp::p_ban_members)},
{_SC("Administrator"), static_cast< SQInteger >(dpp::p_administrator)},
{_SC("ManageChannels"), static_cast< SQInteger >(dpp::p_manage_channels)},
{_SC("ManageGuild"), static_cast< SQInteger >(dpp::p_manage_guild)},
{_SC("AddReactions"), static_cast< SQInteger >(dpp::p_add_reactions)},
{_SC("ViewAuditLog"), static_cast< SQInteger >(dpp::p_view_audit_log)},
{_SC("PrioritySpeaker"), static_cast< SQInteger >(dpp::p_priority_speaker)},
{_SC("Stream"), static_cast< SQInteger >(dpp::p_stream)},
{_SC("ViewChannel"), static_cast< SQInteger >(dpp::p_view_channel)},
{_SC("SendMessages"), static_cast< SQInteger >(dpp::p_send_messages)},
{_SC("SendTtsMessages"), static_cast< SQInteger >(dpp::p_send_tts_messages)},
{_SC("ManageMessages"), static_cast< SQInteger >(dpp::p_manage_messages)},
{_SC("EmbedLinks"), static_cast< SQInteger >(dpp::p_embed_links)},
{_SC("AttachFiles"), static_cast< SQInteger >(dpp::p_attach_files)},
{_SC("ReadMessageHistory"), static_cast< SQInteger >(dpp::p_read_message_history)},
{_SC("MentionEveryone"), static_cast< SQInteger >(dpp::p_mention_everyone)},
{_SC("UseExternalEmojis"), static_cast< SQInteger >(dpp::p_use_external_emojis)},
{_SC("ViewGuildInsights"), static_cast< SQInteger >(dpp::p_view_guild_insights)},
{_SC("Connect"), static_cast< SQInteger >(dpp::p_connect)},
{_SC("Speak"), static_cast< SQInteger >(dpp::p_speak)},
{_SC("MuteMembers"), static_cast< SQInteger >(dpp::p_mute_members)},
{_SC("DeafenMembers"), static_cast< SQInteger >(dpp::p_deafen_members)},
{_SC("MoveMembers"), static_cast< SQInteger >(dpp::p_move_members)},
{_SC("UseVAD"), static_cast< SQInteger >(dpp::p_use_vad)},
{_SC("ChangeNickname"), static_cast< SQInteger >(dpp::p_change_nickname)},
{_SC("ManageNicknames"), static_cast< SQInteger >(dpp::p_manage_nicknames)},
{_SC("ManageRoles"), static_cast< SQInteger >(dpp::p_manage_roles)},
{_SC("ManageWebHooks"), static_cast< SQInteger >(dpp::p_manage_webhooks)},
{_SC("ManageEmojis"), static_cast< SQInteger >(dpp::p_manage_emojis)},
{_SC("UseSlashCommands"), static_cast< SQInteger >(dpp::p_use_slash_commands)},
{_SC("RequestToSpeak"), static_cast< SQInteger >(dpp::p_request_to_speak)},
{_SC("ManageThreads"), static_cast< SQInteger >(dpp::p_manage_threads)},
{_SC("UsePublicThreads"), static_cast< SQInteger >(dpp::p_use_public_threads)},
{_SC("UsePrivateThreads"), static_cast< SQInteger >(dpp::p_use_private_threads)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpUserFlagsEnum[] = {
{_SC("Bot"), static_cast< SQInteger >(dpp::u_bot)},
{_SC("System"), static_cast< SQInteger >(dpp::u_system)},
{_SC("MfaEnabled"), static_cast< SQInteger >(dpp::u_mfa_enabled)},
{_SC("Verified"), static_cast< SQInteger >(dpp::u_verified)},
{_SC("NitroFull"), static_cast< SQInteger >(dpp::u_nitro_full)},
{_SC("NitroClassic"), static_cast< SQInteger >(dpp::u_nitro_classic)},
{_SC("DiscordEmployee"), static_cast< SQInteger >(dpp::u_discord_employee)},
{_SC("PartneredOwner"), static_cast< SQInteger >(dpp::u_partnered_owner)},
{_SC("HypesquadEvents"), static_cast< SQInteger >(dpp::u_hypesquad_events)},
{_SC("Bughunter1"), static_cast< SQInteger >(dpp::u_bughunter_1)},
{_SC("HouseBravery"), static_cast< SQInteger >(dpp::u_house_bravery)},
{_SC("HouseBrilliance"), static_cast< SQInteger >(dpp::u_house_brilliance)},
{_SC("HouseBalanace"), static_cast< SQInteger >(dpp::u_house_balanace)},
{_SC("EarlySupporter"), static_cast< SQInteger >(dpp::u_early_supporter)},
{_SC("TeamUser"), static_cast< SQInteger >(dpp::u_team_user)},
{_SC("Bughunter2"), static_cast< SQInteger >(dpp::u_bughunter_2)},
{_SC("VerifiedBot"), static_cast< SQInteger >(dpp::u_verified_bot)},
{_SC("VerifiedBotDev"), static_cast< SQInteger >(dpp::u_verified_bot_dev)},
{_SC("AnimatedIcon"), static_cast< SQInteger >(dpp::u_animated_icon)},
{_SC("CertifiedModerator"), static_cast< SQInteger >(dpp::u_certified_moderator)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpRegionEnum[] = {
{_SC("Brazil"), static_cast< SQInteger >(dpp::r_brazil)},
{_SC("CentralEurope"), static_cast< SQInteger >(dpp::r_central_europe)},
{_SC("HongKong"), static_cast< SQInteger >(dpp::r_hong_kong)},
{_SC("India"), static_cast< SQInteger >(dpp::r_india)},
{_SC("Japan"), static_cast< SQInteger >(dpp::r_japan)},
{_SC("Russia"), static_cast< SQInteger >(dpp::r_russia)},
{_SC("Singapore"), static_cast< SQInteger >(dpp::r_singapore)},
{_SC("SouthAfrica"), static_cast< SQInteger >(dpp::r_south_africa)},
{_SC("Sydney"), static_cast< SQInteger >(dpp::r_sydney)},
{_SC("UsCentral"), static_cast< SQInteger >(dpp::r_us_central)},
{_SC("UsEast"), static_cast< SQInteger >(dpp::r_us_east)},
{_SC("UsSouth"), static_cast< SQInteger >(dpp::r_us_south)},
{_SC("UsWest"), static_cast< SQInteger >(dpp::r_us_west)},
{_SC("WesternEurope"), static_cast< SQInteger >(dpp::r_western_europe)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpGuildFlagsEnum[] = {
{_SC("Large"), static_cast< SQInteger >(dpp::g_large)},
{_SC("Unavailable"), static_cast< SQInteger >(dpp::g_unavailable)},
{_SC("WidgetEnabled"), static_cast< SQInteger >(dpp::g_widget_enabled)},
{_SC("InviteSplash"), static_cast< SQInteger >(dpp::g_invite_splash)},
{_SC("VipRegions"), static_cast< SQInteger >(dpp::g_vip_regions)},
{_SC("VanityURL"), static_cast< SQInteger >(dpp::g_vanity_url)},
{_SC("Verified"), static_cast< SQInteger >(dpp::g_verified)},
{_SC("Partnered"), static_cast< SQInteger >(dpp::g_partnered)},
{_SC("Community"), static_cast< SQInteger >(dpp::g_community)},
{_SC("Commerce"), static_cast< SQInteger >(dpp::g_commerce)},
{_SC("News"), static_cast< SQInteger >(dpp::g_news)},
{_SC("Discoverable"), static_cast< SQInteger >(dpp::g_discoverable)},
{_SC("Featureable"), static_cast< SQInteger >(dpp::g_featureable)},
{_SC("AnimatedIcon"), static_cast< SQInteger >(dpp::g_animated_icon)},
{_SC("Banner"), static_cast< SQInteger >(dpp::g_banner)},
{_SC("WelcomeScreenEnabled"), static_cast< SQInteger >(dpp::g_welcome_screen_enabled)},
{_SC("MemberVerificationGate"), static_cast< SQInteger >(dpp::g_member_verification_gate)},
{_SC("PreviewEnabled"), static_cast< SQInteger >(dpp::g_preview_enabled)},
{_SC("NoJoinNotifications"), static_cast< SQInteger >(dpp::g_no_join_notifications)},
{_SC("NoBoostNotifications"), static_cast< SQInteger >(dpp::g_no_boost_notifications)},
{_SC("HasAnimatedIcon"), static_cast< SQInteger >(dpp::g_has_animated_icon)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElement g_DpGuildMemberFlagsEnum[] = {
{_SC("Deaf"), static_cast< SQInteger >(dpp::gm_deaf)},
{_SC("Mute"), static_cast< SQInteger >(dpp::gm_mute)},
{_SC("Pending"), static_cast< SQInteger >(dpp::gm_pending)}
};
// ------------------------------------------------------------------------------------------------
static const EnumElements g_EnumList[] = {
{_SC("SqDiscordLogLevel"), g_DpLogLevelEnum},
{_SC("SqDiscordImageType"), g_DpImageTypeEnum},
{_SC("SqDiscordCachePolicy"), g_DpCachePolicyEnum},
{_SC("SqDiscordClusterIntents"), g_DpClusterIntentsEnum},
{_SC("SqDiscordPresenceFlags"), g_DpPresenceFlagsEnum},
{_SC("SqDiscordPresenceStatus"), g_DpPresenceStatusEnum},
{_SC("SqDiscordDesktopStatusBits"), g_DpDesktopStatusBitsEnum},
{_SC("SqDiscordActivityType"), g_DpActivityTypeEnum},
{_SC("SqDiscordActivityFlags"), g_DpActivityFlagsEnum},
{_SC("SqDiscordVoiceStateFlags"), g_DpVoiceStateFlagsEnum},
{_SC("SqDiscordRoleFlags"), g_DpRoleFlagsEnum},
{_SC("SqDiscordRolePermissions"), g_DpRolePermissionsEnum},
{_SC("SqDiscordUserFlags"), g_DpUserFlagsEnum},
{_SC("SqDiscordRegion"), g_DpRegionEnum},
{_SC("SqDiscordGuildFlags"), g_DpGuildFlagsEnum},
{_SC("SqDiscordGuildMemberFlags"), g_DpGuildMemberFlagsEnum}
};
// ------------------------------------------------------------------------------------------------
void Register_DPPConst(HSQUIRRELVM vm, Table &)
{
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordLogLevel"), Enumeration(vm)
.Const(_SC("Trace"), static_cast< SQInteger >(dpp::ll_trace))
.Const(_SC("Debug"), static_cast< SQInteger >(dpp::ll_debug))
.Const(_SC("Info"), static_cast< SQInteger >(dpp::ll_info))
.Const(_SC("Warning"), static_cast< SQInteger >(dpp::ll_warning))
.Const(_SC("Error"), static_cast< SQInteger >(dpp::ll_error))
.Const(_SC("Critical"), static_cast< SQInteger >(dpp::ll_critical))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordImageType"), Enumeration(vm)
.Const(_SC("PNG"), static_cast< SQInteger >(dpp::i_png))
.Const(_SC("JPG"), static_cast< SQInteger >(dpp::i_jpg))
.Const(_SC("GIF"), static_cast< SQInteger >(dpp::i_gif))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordCachePolicy"), Enumeration(vm)
.Const(_SC("Aggressive"), static_cast< SQInteger >(dpp::cp_aggressive))
.Const(_SC("Lazy"), static_cast< SQInteger >(dpp::cp_lazy))
.Const(_SC("None"), static_cast< SQInteger >(dpp::cp_none))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordClusterIntents"), Enumeration(vm)
.Const(_SC("Guilds"), static_cast< SQInteger >(dpp::i_guilds))
.Const(_SC("GuildMembers"), static_cast< SQInteger >(dpp::i_guild_members))
.Const(_SC("GuildBans"), static_cast< SQInteger >(dpp::i_guild_bans))
.Const(_SC("GuildEmojis"), static_cast< SQInteger >(dpp::i_guild_emojis))
.Const(_SC("GuildIntegrations"), static_cast< SQInteger >(dpp::i_guild_integrations))
.Const(_SC("GuildWebhooks"), static_cast< SQInteger >(dpp::i_guild_webhooks))
.Const(_SC("GuildInvites"), static_cast< SQInteger >(dpp::i_guild_invites))
.Const(_SC("GuildVoiceStates"), static_cast< SQInteger >(dpp::i_guild_voice_states))
.Const(_SC("GuildPresences"), static_cast< SQInteger >(dpp::i_guild_presences))
.Const(_SC("GuildMessages"), static_cast< SQInteger >(dpp::i_guild_messages))
.Const(_SC("GuildMessageReactions"), static_cast< SQInteger >(dpp::i_guild_message_reactions))
.Const(_SC("GuildMessageTyping"), static_cast< SQInteger >(dpp::i_guild_message_typing))
.Const(_SC("DirectMessages"), static_cast< SQInteger >(dpp::i_direct_messages))
.Const(_SC("DirectMessageReactions"), static_cast< SQInteger >(dpp::i_direct_message_reactions))
.Const(_SC("DirectMessageTyping"), static_cast< SQInteger >(dpp::i_direct_message_typing))
.Const(_SC("Default"), static_cast< SQInteger >(dpp::i_default_intents))
.Const(_SC("Privileged"), static_cast< SQInteger >(dpp::i_privileged_intents))
.Const(_SC("All"), static_cast< SQInteger >(dpp::i_all_intents))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordPresenceFlags"), Enumeration(vm)
.Const(_SC("DesktopOnline"), static_cast< SQInteger >(dpp::p_desktop_online))
.Const(_SC("DesktopDND"), static_cast< SQInteger >(dpp::p_desktop_dnd))
.Const(_SC("DesktopIdle"), static_cast< SQInteger >(dpp::p_desktop_idle))
.Const(_SC("WebWnline"), static_cast< SQInteger >(dpp::p_web_online))
.Const(_SC("WebDND"), static_cast< SQInteger >(dpp::p_web_dnd))
.Const(_SC("WebIdle"), static_cast< SQInteger >(dpp::p_web_idle))
.Const(_SC("MobileOnline"), static_cast< SQInteger >(dpp::p_mobile_online))
.Const(_SC("MobileDND"), static_cast< SQInteger >(dpp::p_mobile_dnd))
.Const(_SC("MobileIdle"), static_cast< SQInteger >(dpp::p_mobile_idle))
.Const(_SC("StatusOnline"), static_cast< SQInteger >(dpp::p_status_online))
.Const(_SC("StatusDND"), static_cast< SQInteger >(dpp::p_status_dnd))
.Const(_SC("StatusIdle"), static_cast< SQInteger >(dpp::p_status_idle))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordPresenceStatus"), Enumeration(vm)
.Const(_SC("Offline"), static_cast< SQInteger >(dpp::ps_offline))
.Const(_SC("Online"), static_cast< SQInteger >(dpp::ps_online))
.Const(_SC("DND"), static_cast< SQInteger >(dpp::ps_dnd))
.Const(_SC("Idle"), static_cast< SQInteger >(dpp::ps_idle))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordDesktopStatusBits"), Enumeration(vm)
.Const(_SC("ShiftDesktop"), static_cast< SQInteger >(PF_SHIFT_DESKTOP))
.Const(_SC("ShiftWeb"), static_cast< SQInteger >(PF_SHIFT_WEB))
.Const(_SC("ShiftMobile"), static_cast< SQInteger >(PF_SHIFT_MOBILE))
.Const(_SC("ShiftMain"), static_cast< SQInteger >(PF_SHIFT_MAIN))
.Const(_SC("StatusMask"), static_cast< SQInteger >(PF_STATUS_MASK))
.Const(_SC("ClearDesktop"), static_cast< SQInteger >(PF_CLEAR_DESKTOP))
.Const(_SC("ClearWeb"), static_cast< SQInteger >(PF_CLEAR_WEB))
.Const(_SC("ClearMobile"), static_cast< SQInteger >(PF_CLEAR_MOBILE))
.Const(_SC("ClearStatus"), static_cast< SQInteger >(PF_CLEAR_STATUS))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordActivityType"), Enumeration(vm)
.Const(_SC("Game"), static_cast< SQInteger >(dpp::at_game))
.Const(_SC("Streaming"), static_cast< SQInteger >(dpp::at_streaming))
.Const(_SC("Listening"), static_cast< SQInteger >(dpp::at_listening))
.Const(_SC("Custom"), static_cast< SQInteger >(dpp::at_custom))
.Const(_SC("Competing"), static_cast< SQInteger >(dpp::at_competing))
);
// --------------------------------------------------------------------------------------------
ConstTable(vm).Enum(_SC("SqDiscordActivityFlags"), Enumeration(vm)
.Const(_SC("Instance"), static_cast< SQInteger >(dpp::af_instance))
.Const(_SC("Join"), static_cast< SQInteger >(dpp::af_join))
.Const(_SC("Spectate"), static_cast< SQInteger >(dpp::af_spectate))
.Const(_SC("JoinRequest"), static_cast< SQInteger >(dpp::af_join_request))
.Const(_SC("Sync"), static_cast< SQInteger >(dpp::af_sync))
.Const(_SC("Play"), static_cast< SQInteger >(dpp::af_play))
);
RegisterEnumerations(vm, g_EnumList);
}
} // Namespace:: SqMod

File diff suppressed because it is too large Load Diff

View File

@ -612,6 +612,30 @@ public:
//sq_pop(vm,1); // pop array
return *this;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Appends values to the end of the Array
///
/// \param vec Vector to be appended to the array
///
/// \tparam T Type of value (usually doesnt need to be defined explicitly)
///
/// \return The Array itself so the call can be chained
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T>
ArrayBase& AppendFromVector(const std::vector< T > & vec) {
HSQUIRRELVM vm = SqVM();
const StackGuard sg(vm);
sq_pushobject(vm, GetObj());
for (const auto & v : vec)
{
Var< const T & >::push(vm, v);
sq_arrayappend(vm, -2);
}
//sq_pop(vm,1); // pop array
return *this;
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -31,6 +31,9 @@
#include <cstring>
#include <map>
#include <unordered_map>
#include "sqratAllocator.h"
#include "sqratTypes.h"
#include "sqratOverloadMethods.h"
@ -669,6 +672,128 @@ public:
return res;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Inserts associative container values into the managed object.
///
/// \param map Associative container to be inserted to the table
///
/// \tparam K Type of key (usually doesnt need to be defined explicitly)
///
/// \tparam V Type of value (usually doesnt need to be defined explicitly)
///
/// \return Result value returned by squirrel.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class K, class V>
SQRESULT InsertFromMap(const std::unordered_map< K, V > & map, bool staticVar = false) {
HSQUIRRELVM vm = SqVM();
const StackGuard sg(vm);
sq_pushobject(vm, GetObj());
for (const auto & p : map)
{
Var< const K & >::push(vm, p.first);
Var< const V & >::push(vm, p.second);
const auto r = sq_newslot(vm, -3, staticVar);
if (SQ_FAILED(r)) return r;
}
//sq_pop(vm, 1); // pop object
return SQ_OK;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Inserts associative container values into the managed object.
///
/// \param map Associative container to be inserted to the table
///
/// \tparam K Type of key (usually doesnt need to be defined explicitly)
///
/// \tparam V Type of value (usually doesnt need to be defined explicitly)
///
/// \return Result value returned by squirrel.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class K, class V>
SQRESULT InsertFromMap(const std::map< K, V > & map, bool staticVar = false) {
HSQUIRRELVM vm = SqVM();
const StackGuard sg(vm);
sq_pushobject(vm, GetObj());
for (const auto & p : map)
{
Var< const K & >::push(vm, p.first);
Var< const V & >::push(vm, p.second);
const auto r = sq_newslot(vm, -3, staticVar);
if (SQ_FAILED(r)) return r;
}
//sq_pop(vm, 1); // pop object
return SQ_OK;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Inserts associative container values into the managed object.
///
/// \param map Associative container to be inserted to the table
///
/// \param func Functor that is continuously called to push values on the stack
///
/// \tparam K Type of key (usually doesnt need to be defined explicitly)
///
/// \tparam V Type of value (usually doesnt need to be defined explicitly)
///
/// \tparam F Type of functor (usually doesnt need to be defined explicitly)
///
/// \return Result value returned by squirrel.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class K, class V, class F>
SQRESULT InsertFromMapWith(const std::unordered_map< K, V > & map, F func, bool staticVar = false) {
HSQUIRRELVM vm = SqVM();
const StackGuard sg(vm);
sq_pushobject(vm, GetObj());
SQRESULT r = SQ_OK;
for (const auto & p : map)
{
r = func(vm, p.first, p.second);
if (SQ_FAILED(r)) break;
r = sq_newslot(vm, -3, staticVar);
if (SQ_FAILED(r)) return r;
}
//sq_pop(vm, 1); // pop object
return r;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Inserts associative container values into the managed object.
///
/// \param map Associative container to be inserted to the table
///
/// \param func Functor that is continuously called to push values on the stack
///
/// \tparam K Type of key (usually doesnt need to be defined explicitly)
///
/// \tparam V Type of value (usually doesnt need to be defined explicitly)
///
/// \tparam F Type of functor (usually doesnt need to be defined explicitly)
///
/// \return Result value returned by squirrel.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class K, class V, class F>
SQRESULT InsertFromMapWith(const std::map< K, V > & map, F func, bool staticVar = false) {
HSQUIRRELVM vm = SqVM();
const StackGuard sg(vm);
sq_pushobject(vm, GetObj());
SQRESULT r = SQ_OK;
for (const auto & p : map)
{
r = func(vm, p.first, p.second);
if (SQ_FAILED(r)) break;
r = sq_newslot(vm, -3, staticVar);
if (SQ_FAILED(r)) return r;
}
//sq_pop(vm, 1); // pop object
return r;
}
protected:
/// @cond DEV

View File

@ -181,7 +181,7 @@ private:
template <class T2, bool b>
struct pushAsInt {
void push(HSQUIRRELVM vm, const T2& /*value*/) {
inline void push(HSQUIRRELVM vm, const T2& /*value*/) noexcept {
assert(false); // fails because called before a Sqrat::Class for T exists and T is not convertible to SQInteger
sq_pushnull(vm);
}
@ -189,8 +189,8 @@ private:
template <class T2>
struct pushAsInt<T2, true> {
void push(HSQUIRRELVM vm, const T2& value) {
sq_pushinteger(vm, static_cast<SQInteger>(value));
inline void push(HSQUIRRELVM vm, const T2& val) noexcept {
sq_pushinteger(vm, static_cast<SQInteger>(val));
}
};
};
@ -237,7 +237,7 @@ private:
template <class T2, bool b>
struct pushAsInt {
void push(HSQUIRRELVM vm, const T2& /*value*/) {
inline void push(HSQUIRRELVM vm, const T2& /*value*/) noexcept {
assert(false); // fails because called before a Sqrat::Class for T exists and T is not convertible to SQInteger
sq_pushnull(vm);
}
@ -245,8 +245,8 @@ private:
template <class T2>
struct pushAsInt<T2, true> {
void push(HSQUIRRELVM vm, const T2& value) {
sq_pushinteger(vm, static_cast<SQInteger>(value));
inline void push(HSQUIRRELVM vm, const T2& val) noexcept {
sq_pushinteger(vm, static_cast<SQInteger>(val));
}
};
};
@ -483,7 +483,7 @@ struct Var<SharedPtr<T> > {
Var(HSQUIRRELVM vm, SQInteger idx) { \
value = popAsInt<type, true>(vm, idx).value; \
} \
static void push(HSQUIRRELVM vm, const type& value) { \
inline static void push(HSQUIRRELVM vm, const type& value) noexcept { \
sq_pushinteger(vm, static_cast<SQInteger>(value)); \
} \
};\
@ -494,7 +494,7 @@ struct Var<SharedPtr<T> > {
Var(HSQUIRRELVM vm, SQInteger idx) { \
value = popAsInt<type, true>(vm, idx).value; \
} \
static void push(HSQUIRRELVM vm, const type& value) { \
inline static void push(HSQUIRRELVM vm, const type& value) noexcept { \
sq_pushinteger(vm, static_cast<SQInteger>(value)); \
} \
};
@ -525,7 +525,7 @@ SCRAT_INTEGER(signed __int64)
Var(HSQUIRRELVM vm, SQInteger idx) { \
value = popAsFloat<type>(vm, idx).value; \
} \
static void push(HSQUIRRELVM vm, const type& value) { \
inline static void push(HSQUIRRELVM vm, const type& value) noexcept { \
sq_pushfloat(vm, static_cast<SQFloat>(value)); \
} \
}; \
@ -536,7 +536,7 @@ SCRAT_INTEGER(signed __int64)
Var(HSQUIRRELVM vm, SQInteger idx) { \
value = popAsFloat<type>(vm, idx).value; \
} \
static void push(HSQUIRRELVM vm, const type& value) { \
inline static void push(HSQUIRRELVM vm, const type& value) noexcept { \
sq_pushfloat(vm, static_cast<SQFloat>(value)); \
} \
};
@ -572,7 +572,7 @@ struct Var<bool> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const bool& value) {
inline static void push(HSQUIRRELVM vm, const bool& value) noexcept {
sq_pushbool(vm, static_cast<SQBool>(value));
}
};
@ -605,7 +605,7 @@ struct Var<const bool&> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const bool& value) {
inline static void push(HSQUIRRELVM vm, const bool& value) noexcept {
sq_pushbool(vm, static_cast<SQBool>(value));
}
};
@ -615,7 +615,7 @@ struct Var<const bool&> {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<>
struct Var<std::nullptr_t> {
std::nullptr_t value; ///< The actual value of get operations
std::nullptr_t value{}; ///< The actual value of get operations
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Attempts to get the value off the stack at idx as a nullptr_t
@ -632,7 +632,7 @@ struct Var<std::nullptr_t> {
/// \param vm Target VM
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm) {
inline static void push(HSQUIRRELVM vm) noexcept {
sq_pushnull(vm);
}
@ -643,7 +643,7 @@ struct Var<std::nullptr_t> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, std::nullptr_t SQ_UNUSED_ARG(value)) {
inline static void push(HSQUIRRELVM vm, std::nullptr_t SQ_UNUSED_ARG(value)) noexcept {
sq_pushnull(vm);
}
};
@ -655,13 +655,13 @@ template<>
struct Var<SQChar*> {
private:
HSQOBJECT obj; /* hold a reference to the object holding value during the Var struct lifetime*/
HSQUIRRELVM v;
HSQOBJECT obj{}; /* hold a reference to the object holding value during the Var struct lifetime*/
HSQUIRRELVM v{nullptr};
public:
SQChar* value; ///< The actual value of get operations
SQInteger size; ///< The size of the obtained string
SQChar* value{nullptr}; ///< The actual value of get operations
SQInteger size{0}; ///< The size of the obtained string
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Attempts to get the value off the stack at idx as a character array
@ -698,7 +698,7 @@ public:
/// \param len Length of the string (defaults to finding the length by searching for a terminating null-character)
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const SQChar* value, SQInteger len = -1) {
inline static void push(HSQUIRRELVM vm, const SQChar* value, SQInteger len = -1) noexcept {
sq_pushstring(vm, value, len);
}
};
@ -710,13 +710,13 @@ template<>
struct Var<const SQChar*> {
private:
HSQOBJECT obj; /* hold a reference to the object holding value during the Var struct lifetime*/
HSQUIRRELVM v;
HSQOBJECT obj{}; /* hold a reference to the object holding value during the Var struct lifetime*/
HSQUIRRELVM v{nullptr};
public:
const SQChar* value; ///< The actual value of get operations
SQInteger size; ///< The size of the obtained string
const SQChar* value{nullptr}; ///< The actual value of get operations
SQInteger size{0}; ///< The size of the obtained string
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Attempts to get the value off the stack at idx as a character array
@ -753,7 +753,7 @@ public:
/// \param len Length of the string (defaults to finding the length by searching for a terminating null-character)
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const SQChar* value, SQInteger len = -1) {
inline static void push(HSQUIRRELVM vm, const SQChar* value, SQInteger len = -1) noexcept {
sq_pushstring(vm, value, len);
}
};
@ -789,8 +789,8 @@ struct Var<string> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const string& value) {
sq_pushstring(vm, value.c_str(), value.size());
inline static void push(HSQUIRRELVM vm, const string& value) noexcept {
sq_pushstring(vm, value.c_str(), static_cast< SQInteger >(value.size()));
}
};
@ -825,8 +825,8 @@ struct Var<const string&> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const string& value) {
sq_pushstring(vm, value.c_str(), value.size());
inline static void push(HSQUIRRELVM vm, const string& value) noexcept {
sq_pushstring(vm, value.c_str(), static_cast< SQInteger >(value.size()));
}
};
@ -863,7 +863,7 @@ struct Var<std::wstring> {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const std::wstring& value) {
std::string s(value.begin(), value.end());
sq_pushstring(vm, s.c_str(), s.size());
sq_pushstring(vm, s.c_str(), static_cast< SQInteger >(s.size()));
}
};
@ -900,7 +900,7 @@ struct Var<const std::wstring&> {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const std::wstring& value) {
std::string s(value.begin(), value.end());
sq_pushstring(vm, s.c_str(), s.size());
sq_pushstring(vm, s.c_str(), static_cast< SQInteger >(s.size()));
}
};
@ -1173,7 +1173,7 @@ struct Var<StackStrF> {
/// \param value Value to push on to the VM's stack
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void push(HSQUIRRELVM vm, const StackStrF& value) {
static void push(HSQUIRRELVM vm, const StackStrF& value) noexcept {
if (sq_isstring(value.mObj)) {
sq_pushobject(vm, value.mObj);
} else {
@ -1284,7 +1284,7 @@ inline void PushVars(HSQUIRRELVM /*vm*/) { }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T>
inline void PushVars(HSQUIRRELVM vm, T value) {
PushVar(vm, value);
PushVar(vm, std::forward< T >(value));
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -1292,15 +1292,15 @@ inline void PushVars(HSQUIRRELVM vm, T value) {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T, class... Ts>
inline void PushVars(HSQUIRRELVM vm, T value, Ts &&... tail) {
PushVar(vm, value);
PushVars(vm, std::forward<Ts>(tail)...);
PushVar(vm, std::forward< T >(value));
PushVars(vm, std::forward< Ts >(tail)...);
}
/// @cond DEV
template<class T, bool b>
struct PushVarR_helper {
inline static void push(HSQUIRRELVM vm, T value) {
PushVar<T>(vm, value);
PushVar<T>(vm, std::forward< T >(value));
}
};
template<class T>