()
| 194 | emojis: emojipjson[] = []; |
| 195 | large!: boolean; |
| 196 | readonly stickers = new Map<string, Sticker>(); |
| 197 | readonly members = new Map<string, Member>(); |
| 198 | welcomeScreen?: welcomeScreen; |
| 199 | static readonly contextmenu = new Contextmenu<Guild, void>("guild menu"); |
| 200 | static setupcontextmenu() { |
| 201 | Guild.contextmenu.addButton( |
| 202 | () => I18n.guild.markRead(), |
| 203 | function (this: Guild) { |
| 204 | this.markAsRead(); |
| 205 | }, |
| 206 | ); |
| 207 | Guild.contextmenu.addSeperator(); |
| 208 | |
| 209 | Guild.contextmenu.addButton( |
| 210 | () => I18n.guild.makeInvite(), |
| 211 | function (this: Guild) { |
| 212 | const d = new Dialog(""); |
| 213 | this.makeInviteMenu(d.options); |
| 214 | d.show(); |
| 215 | }, |
| 216 | { |
| 217 | enabled: function () { |
| 218 | return this.member.hasPermission("CREATE_INSTANT_INVITE"); |
| 219 | }, |
| 220 | color: "blue", |
| 221 | }, |
| 222 | ); |
| 223 | |
| 224 | Guild.contextmenu.addButton( |
| 225 | () => I18n.guild.notifications(), |
| 226 | function (this: Guild) { |
| 227 | this.setnotifcation(); |
| 228 | }, |
| 229 | ); |
| 230 | Guild.contextmenu.addSeperator(); |
| 231 | this.contextmenu.addButton( |
| 232 | () => I18n.user.editServerProfile(), |
| 233 | function () { |
| 234 | this.member.showEditProfile(); |
| 235 | }, |
| 236 | ); |
| 237 | Guild.contextmenu.addSeperator(); |
| 238 | |
| 239 | Guild.contextmenu.addButton( |
| 240 | () => I18n.guild.leave(), |
| 241 | function (this: Guild) { |
| 242 | this.confirmleave(); |
| 243 | }, |
| 244 | { |
| 245 | visible: function (_) { |
| 246 | return this.properties.owner_id !== this.member.user.id; |
| 247 | }, |
| 248 | color: "red", |
| 249 | }, |
| 250 | ); |
| 251 | |
| 252 | Guild.contextmenu.addButton( |
| 253 | () => I18n.guild.delete(), |
no test coverage detected