mirror of
https://github.com/Syping/dtranslatebot.git
synced 2026-04-21 14:40:41 +02:00
add direct message support
This commit is contained in:
parent
7588ca865b
commit
77621a8991
15 changed files with 115 additions and 40 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* dtranslatebot Discord Translate Bot
|
||||
* Copyright (C) 2024 Syping
|
||||
* Copyright (C) 2024-2026 Syping
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
|
@ -25,13 +25,20 @@
|
|||
#include <queue>
|
||||
|
||||
namespace bot {
|
||||
struct translated_message {
|
||||
struct translated_direct_message {
|
||||
dpp::message_context_menu_t event;
|
||||
std::string message;
|
||||
};
|
||||
|
||||
struct translated_guild_message {
|
||||
std::string author;
|
||||
std::string avatar;
|
||||
std::string message;
|
||||
dpp::webhook webhook;
|
||||
};
|
||||
|
||||
typedef std::variant<translated_direct_message, translated_guild_message> translated_message;
|
||||
|
||||
class submit_queue {
|
||||
public:
|
||||
void add(const translated_message &message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue