-
-
Notifications
You must be signed in to change notification settings - Fork 730
/
User.java
116 lines (102 loc) · 3.9 KB
/
User.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* Copyright 2015-2016 Austin Keener & Michael Ritter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.dv8tion.jda.core.entities;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.OnlineStatus;
import net.dv8tion.jda.core.requests.RestAction;
/**
* Represents a Discord User.
* Contains all publicly available information about a specific Discord User.
*/
public interface User extends ISnowflake, IMentionable, IFakeable
{
/**
* The username of the {@link net.dv8tion.jda.core.entities.User User}. Length is between 2 and 32 characters (inclusive).
*
* @return
* Never-null String containing the {@link net.dv8tion.jda.core.entities.User User}'s username.
*/
String getName();
/**
* The discriminator of the {@link net.dv8tion.jda.core.entities.User User}. Used to differentiate between users with the same usernames.<br>
* This will be important when the friends list is released for human readable searching.<br>
* Ex: DV8FromTheWorld#9148
*
* @return
* Never-null String containing the {@link net.dv8tion.jda.core.entities.User User} discriminator.
*/
String getDiscriminator();
/**
* The Discord Id for this user's avatar image.
* If the user has not set an image, this will return null.
*
* @return
* Possibly-null String containing the {@link net.dv8tion.jda.core.entities.User User} avatar id.
*/
String getAvatarId();
/**
* The URL for the for the user's avatar image.
* If the user has not set an image, this will return null.
*
* @return
* Possibly-null String containing the {@link net.dv8tion.jda.core.entities.User User} avatar url.
*/
String getAvatarUrl();
/**
* The Discord Id for this user's default avatar image.
*
* @return
* Never-null String containing the {@link net.dv8tion.jda.core.entities.User User} default avatar id.
*/
String getDefaultAvatarId();
/**
* The URL for the for the user's default avatar image.
*
* @return
* Never-null String containing the {@link net.dv8tion.jda.core.entities.User User} default avatar url.
*/
String getDefaultAvatarUrl();
/**
* Whether or not the currently logged in user and this user have a currently open
* {@link net.dv8tion.jda.core.entities.PrivateChannel PrivateChannel} or not.
*
* @return
* True if the logged in account shares a PrivateChannel with this user.
*/
boolean hasPrivateChannel();
RestAction<PrivateChannel> openPrivateChannel();
/**
* Gets the {@link net.dv8tion.jda.core.entities.PrivateChannel PrivateChannel} of this
* {@link net.dv8tion.jda.core.entities.User User} for use in sending direct messages.
*
* @return
* Never-null {@link net.dv8tion.jda.core.entities.PrivateChannel PrivateChannel} that is associated with this {@link net.dv8tion.jda.core.entities.User User}.
*/
PrivateChannel getPrivateChannel();
/**
* Returns whether or not the given user is a Bot-Account (special badge in client, some different behaviour)
*
* @return
* If the User's Account is marked as Bot
*/
boolean isBot();
/**
* Returns the {@link net.dv8tion.jda.core.JDA JDA} instance of this User
* @return
* the corresponding JDA instance
*/
JDA getJDA();
}