File tree Expand file tree Collapse file tree
application/src/main/java/org/togetherjava/tjbot/features/dynamicvc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .togetherjava .tjbot .features .dynamicvc ;
22
3+ import net .dv8tion .jda .api .EmbedBuilder ;
34import net .dv8tion .jda .api .entities .Guild ;
5+ import net .dv8tion .jda .api .entities .MessageEmbed ;
46import net .dv8tion .jda .api .entities .channel .concrete .VoiceChannel ;
57import net .dv8tion .jda .api .entities .channel .middleman .StandardGuildChannel ;
68import net .dv8tion .jda .api .entities .channel .unions .AudioChannelUnion ;
@@ -184,7 +186,19 @@ private static CompletableFuture<? extends StandardGuildChannel> makeCreateVoice
184186 return originalTopicChannel .createCopy ()
185187 .setName (getNumberedChannelTopic (channelTopic , topicChannelsCount + 1 ))
186188 .setPosition (originalTopicChannel .getPositionRaw ())
187- .submit ();
189+ .submit ()
190+ .whenComplete ((voiceChannel , _ ) -> {
191+ MessageEmbed messageEmbed = new EmbedBuilder ()
192+ .addField ("👋 Heads up!" ,
193+ """
194+ This is a **temporary** voice chat channel. Messages sent here will be *cleared* once \
195+ the channel is deleted when everyone leaves. If you need to keep something important, \
196+ make sure to save it elsewhere. 💬
197+ """ ,
198+ false )
199+ .build ();
200+ voiceChannel .sendMessageEmbeds (messageEmbed ).queue ();
201+ });
188202 }
189203
190204 return CompletableFuture .completedFuture (null );
You can’t perform that action at this time.
0 commit comments