Skip to content

Commit

Permalink
style: change two namespace on one line to dpp::event
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Oct 5, 2023
1 parent 7bc1619 commit 42f3c7a
Show file tree
Hide file tree
Showing 63 changed files with 129 additions and 130 deletions.
11 changes: 5 additions & 6 deletions include/dpp/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
#define event_decl(x,wstype) /** @brief Internal event handler for wstype websocket events. Called for each websocket message of this type. @internal */ \
class x : public event { public: virtual void handle(dpp::discord_client* client, nlohmann::json &j, const std::string &raw); };

namespace dpp {

class discord_client;
namespace dpp {
class discord_client;
};

/**
* @brief The events namespace holds the internal event handlers for each websocket event.
* These are handled internally and also dispatched to the user code if the event is hooked.
*/
namespace events {
namespace dpp::events {

/**
* @brief An event object represents an event handled internally, passed from the websocket e.g. MESSAGE_CREATE.
Expand Down Expand Up @@ -152,5 +152,4 @@ event_decl(automod_rule_execute, AUTO_MODERATION_ACTION_EXECUTION);
/* Audit log */
event_decl(guild_audit_log_entry_create, GUILD_AUDIT_LOG_ENTRY_CREATE);

} // namespace events
} // namespace dpp
} // namespace dpp::events
4 changes: 2 additions & 2 deletions src/dpp/events/automod_rule_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -47,4 +47,4 @@ void automod_rule_create::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/automod_rule_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -47,4 +47,4 @@ void automod_rule_delete::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/automod_rule_execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <dpp/stringops.h>
#include <dpp/json.h>

namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -55,4 +55,4 @@ void automod_rule_execute::handle(discord_client* client, json &j, const std::st
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/automod_rule_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <dpp/stringops.h>
#include <dpp/json.h>

namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -45,4 +45,4 @@ void automod_rule_update::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/channel_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <dpp/stringops.h>
#include <dpp/json.h>

namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -76,4 +76,4 @@ void channel_create::handle(discord_client* client, json &j, const std::string &
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/channel_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -60,4 +60,4 @@ void channel_delete::handle(discord_client* client, json &j, const std::string &
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/channel_pins_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -53,4 +53,4 @@ void channel_pins_update::handle(discord_client* client, json &j, const std::str

}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/channel_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -59,4 +59,4 @@ void channel_update::handle(discord_client* client, json &j, const std::string &
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_audit_log_entry_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <dpp/discordevents.h>
#include <dpp/cluster.h>

namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -43,4 +43,4 @@ void guild_audit_log_entry_create::handle(discord_client* client, json &j, const
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_ban_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -50,4 +50,4 @@ void guild_ban_add::handle(discord_client* client, json &j, const std::string &r
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_ban_remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -50,4 +50,4 @@ void guild_ban_remove::handle(discord_client* client, json &j, const std::string
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -211,4 +211,4 @@ void guild_create::handle(discord_client* client, json &j, const std::string &ra
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -93,4 +93,4 @@ void guild_delete::handle(discord_client* client, json &j, const std::string &ra
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_emojis_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -80,4 +80,4 @@ void guild_emojis_update::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_integrations_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -49,4 +49,4 @@ void guild_integrations_update::handle(class discord_client* client, json &j, co
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_join_request_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand All @@ -47,4 +47,4 @@ void guild_join_request_delete::handle(class discord_client* client, json &j, co
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_member_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -76,4 +76,4 @@ void guild_member_add::handle(discord_client* client, json &j, const std::string
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_member_remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -77,4 +77,4 @@ void guild_member_remove::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_member_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -74,4 +74,4 @@ void guild_member_update::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_members_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -73,4 +73,4 @@ void guild_members_chunk::handle(discord_client* client, json &j, const std::str
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_role_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
using namespace dpp;
Expand Down Expand Up @@ -73,4 +73,4 @@ void guild_role_create::handle(discord_client* client, json &j, const std::strin
}
}

}};
};
4 changes: 2 additions & 2 deletions src/dpp/events/guild_role_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dpp/json.h>


namespace dpp { namespace events {
namespace dpp::events {

using json = nlohmann::json;
/**
Expand Down Expand Up @@ -73,4 +73,4 @@ void guild_role_delete::handle(discord_client* client, json &j, const std::strin
}
}

}};
};
Loading

0 comments on commit 42f3c7a

Please sign in to comment.