mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Add channel whisper functionality (#91)
* ChatChannel -> TextChannel, WhisperChannel, GroupChannel * Add basic whisper channel support * Move WhisperPings into WhisperOptions * Add defaults to WhisperOptions * Various deprecation and refactor fixes * Test and fux bugs
This commit is contained in:
1 parent
14dfcfbf38
commit
f9cac355b6
44 files changed
+797
-304
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package net.draycia.carbon.api.events;
|
||||
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.channels.TextChannel;
|
||||
import net.draycia.carbon.api.users.ChatUser;
|
||||
import net.draycia.carbon.api.Context;
|
||||
import net.draycia.carbon.api.events.misc.CarbonEvent;
|
||||
@@ -9,11 +9,11 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class MessageContextEvent implements CarbonEvent, Cancellable {
|
||||
|
||||
private final @NonNull ChatChannel channel;
|
||||
private final @NonNull TextChannel channel;
|
||||
private final @NonNull ChatUser user;
|
||||
private boolean cancelled = false;
|
||||
|
||||
public MessageContextEvent(final @NonNull ChatChannel channel, final @NonNull ChatUser user) {
|
||||
public MessageContextEvent(final @NonNull TextChannel channel, final @NonNull ChatUser user) {
|
||||
this.channel = channel;
|
||||
this.user = user;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class MessageContextEvent implements CarbonEvent, Cancellable {
|
||||
return this.channel.context(key);
|
||||
}
|
||||
|
||||
public @NonNull ChatChannel channel() {
|
||||
public @NonNull TextChannel channel() {
|
||||
return this.channel;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package net.draycia.carbon.api.events;
|
||||
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.channels.TextChannel;
|
||||
import net.draycia.carbon.api.users.ChatUser;
|
||||
import net.draycia.carbon.api.Context;
|
||||
import net.draycia.carbon.api.events.misc.CarbonEvent;
|
||||
@@ -9,12 +9,12 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
public class ReceiverContextEvent implements CarbonEvent, Cancellable {
|
||||
|
||||
private final @NonNull ChatChannel channel;
|
||||
private final @NonNull TextChannel channel;
|
||||
private final @NonNull ChatUser sender;
|
||||
private final @NonNull ChatUser recipient;
|
||||
private boolean cancelled = false;
|
||||
|
||||
public ReceiverContextEvent(final @NonNull ChatChannel channel, final @NonNull ChatUser sender, final @NonNull ChatUser recipient) {
|
||||
public ReceiverContextEvent(final @NonNull TextChannel channel, final @NonNull ChatUser sender, final @NonNull ChatUser recipient) {
|
||||
this.channel = channel;
|
||||
this.sender = sender;
|
||||
this.recipient = recipient;
|
||||
@@ -34,7 +34,7 @@ public class ReceiverContextEvent implements CarbonEvent, Cancellable {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
|
||||
public @NonNull ChatChannel channel() {
|
||||
public @NonNull TextChannel channel() {
|
||||
return this.channel;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user