enable translation support for permisions
This commit is contained in:
parent
ff76e91ff8
commit
7f95aff2d1
7 changed files with 194 additions and 292 deletions
|
@ -30,9 +30,7 @@ app.use(compression());
|
||||||
|
|
||||||
async function updateInstances(): Promise<void>{
|
async function updateInstances(): Promise<void>{
|
||||||
try{
|
try{
|
||||||
const response = await fetch(
|
const response = await fetch("https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/instances/instances.json");
|
||||||
"https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/instances/instances.json"
|
|
||||||
);
|
|
||||||
const json = (await response.json()) as Instance[];
|
const json = (await response.json()) as Instance[];
|
||||||
for(const instance of json){
|
for(const instance of json){
|
||||||
if(instanceNames.has(instance.name)){
|
if(instanceNames.has(instance.name)){
|
||||||
|
|
|
@ -259,7 +259,7 @@ class Bot{
|
||||||
params.set("scope", "bot");
|
params.set("scope", "bot");
|
||||||
const url=gen.addText("");
|
const url=gen.addText("");
|
||||||
const perms=new Permissions("0");
|
const perms=new Permissions("0");
|
||||||
for(const perm of Permissions.info){
|
for(const perm of Permissions.info()){
|
||||||
const permsisions=new PermissionToggle(perm,perms,gen);
|
const permsisions=new PermissionToggle(perm,perms,gen);
|
||||||
gen.options.push(permsisions);
|
gen.options.push(permsisions);
|
||||||
gen.generate(permsisions);
|
gen.generate(permsisions);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
type translation={
|
type translation={
|
||||||
[key:string]:string|{[key:string]:string}
|
[key:string]:string|translation
|
||||||
};
|
};
|
||||||
let res:()=>unknown=()=>{};
|
let res:()=>unknown=()=>{};
|
||||||
class I18n{
|
class I18n{
|
||||||
static lang:string;
|
static lang:string;
|
||||||
static translations:{[key:string]:string}[]=[];
|
static translations:translation[]=[];
|
||||||
static done=new Promise<void>((res2,_reject)=>{
|
static done=new Promise<void>((res2,_reject)=>{
|
||||||
res=res2;
|
res=res2;
|
||||||
});
|
});
|
||||||
|
@ -12,7 +12,7 @@ class I18n{
|
||||||
if(typeof json === "string"){
|
if(typeof json === "string"){
|
||||||
json=await (await fetch(json)).json() as translation;
|
json=await (await fetch(json)).json() as translation;
|
||||||
}
|
}
|
||||||
const translations:{[key:string]:string}[]=[];
|
const translations:translation[]=[];
|
||||||
let translation=json[lang];
|
let translation=json[lang];
|
||||||
if(!translation){
|
if(!translation){
|
||||||
translation=json[lang[0]+lang[1]];
|
translation=json[lang[0]+lang[1]];
|
||||||
|
@ -32,9 +32,20 @@ class I18n{
|
||||||
}
|
}
|
||||||
static getTranslation(msg:string,...params:string[]):string{
|
static getTranslation(msg:string,...params:string[]):string{
|
||||||
let str:string|undefined;
|
let str:string|undefined;
|
||||||
|
const path=msg.split(".");
|
||||||
for(const json of this.translations){
|
for(const json of this.translations){
|
||||||
str=json[msg];
|
let jsont:string|translation=json;
|
||||||
if(str){
|
for(const thing of path){
|
||||||
|
if(typeof jsont !== "string" ){
|
||||||
|
jsont=jsont[thing];
|
||||||
|
}else{
|
||||||
|
jsont=json;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof jsont === "string"){
|
||||||
|
str=jsont;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +96,7 @@ class I18n{
|
||||||
});
|
});
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
private static async toTranslation(trans:string|{[key:string]:string},lang:string):Promise<{[key:string]:string}>{
|
private static async toTranslation(trans:string|translation,lang:string):Promise<translation>{
|
||||||
if(typeof trans==='string'){
|
if(typeof trans==='string'){
|
||||||
return this.toTranslation((await (await fetch(trans)).json() as translation)[lang],lang);
|
return this.toTranslation((await (await fetch(trans)).json() as translation)[lang],lang);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -231,7 +231,7 @@ type botjsonfetch={
|
||||||
|
|
||||||
if(perms&&permstr){
|
if(perms&&permstr){
|
||||||
const permisions=new Permissions(permstr)
|
const permisions=new Permissions(permstr)
|
||||||
for(const perm of Permissions.info){
|
for(const perm of Permissions.info()){
|
||||||
if(permisions.hasPermission(perm.name,false)){
|
if(permisions.hasPermission(perm.name,false)){
|
||||||
const div=document.createElement("div");
|
const div=document.createElement("div");
|
||||||
const h2=document.createElement("h2");
|
const h2=document.createElement("h2");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { I18n } from "./i18n.js";
|
||||||
|
|
||||||
class Permissions{
|
class Permissions{
|
||||||
allow: bigint;
|
allow: bigint;
|
||||||
deny: bigint;
|
deny: bigint;
|
||||||
|
@ -22,287 +24,75 @@ class Permissions{
|
||||||
const bit = 1n << BigInt(b);
|
const bit = 1n << BigInt(b);
|
||||||
return(big & ~bit) | (BigInt(state) << BigInt(b)); //thanks to geotale for this code :3
|
return(big & ~bit) | (BigInt(state) << BigInt(b)); //thanks to geotale for this code :3
|
||||||
}
|
}
|
||||||
static map: {
|
//private static info: { name: string; readableName: string; description: string }[];
|
||||||
[key: number | string]:
|
static *info():Generator<{ name: string; readableName: string; description: string }>{
|
||||||
| { name: string; readableName: string; description: string }
|
for(const thing of this.permisions){
|
||||||
| number;
|
yield {
|
||||||
};
|
name:thing,
|
||||||
static info: { name: string; readableName: string; description: string }[];
|
readableName:I18n.getTranslation("permissions.readableNames."+thing),
|
||||||
static makeMap(){
|
description:I18n.getTranslation("permissions.descriptions."+thing),
|
||||||
Permissions.info = [
|
}
|
||||||
//for people in the future, do not reorder these, the creation of the map realize on the order
|
}
|
||||||
{
|
}
|
||||||
name: "CREATE_INSTANT_INVITE",
|
static permisions=[
|
||||||
readableName: "Create invite",
|
"CREATE_INSTANT_INVITE",
|
||||||
description: "Allows the user to create invites for the guild",
|
"KICK_MEMBERS",
|
||||||
},
|
"BAN_MEMBERS",
|
||||||
{
|
"ADMINISTRATOR",
|
||||||
name: "KICK_MEMBERS",
|
"MANAGE_CHANNELS",
|
||||||
readableName: "Kick members",
|
"MANAGE_GUILD",
|
||||||
description: "Allows the user to kick members from the guild",
|
"ADD_REACTIONS",
|
||||||
},
|
"VIEW_AUDIT_LOG",
|
||||||
{
|
"PRIORITY_SPEAKER",
|
||||||
name: "BAN_MEMBERS",
|
"STREAM",
|
||||||
readableName: "Ban members",
|
"VIEW_CHANNEL",
|
||||||
description: "Allows the user to ban members from the guild",
|
"SEND_MESSAGES",
|
||||||
},
|
"SEND_TTS_MESSAGES",
|
||||||
{
|
"MANAGE_MESSAGES",
|
||||||
name: "ADMINISTRATOR",
|
"EMBED_LINKS",
|
||||||
readableName: "Administrator",
|
"ATTACH_FILES",
|
||||||
description:
|
"READ_MESSAGE_HISTORY",
|
||||||
"Allows all permissions and bypasses channel permission overwrites. This is a dangerous permission!",
|
"MENTION_EVERYONE",
|
||||||
},
|
"USE_EXTERNAL_EMOJIS",
|
||||||
{
|
"VIEW_GUILD_INSIGHTS",
|
||||||
name: "MANAGE_CHANNELS",
|
"CONNECT",
|
||||||
readableName: "Manage channels",
|
"SPEAK",
|
||||||
description: "Allows the user to manage and edit channels",
|
"MUTE_MEMBERS",
|
||||||
},
|
"DEAFEN_MEMBERS",
|
||||||
{
|
"MOVE_MEMBERS",
|
||||||
name: "MANAGE_GUILD",
|
"USE_VAD",
|
||||||
readableName: "Manage guild",
|
"CHANGE_NICKNAME",
|
||||||
description: "Allows management and editing of the guild",
|
"MANAGE_NICKNAMES",
|
||||||
},
|
"MANAGE_ROLES",
|
||||||
{
|
"MANAGE_WEBHOOKS",
|
||||||
name: "ADD_REACTIONS",
|
"MANAGE_GUILD_EXPRESSIONS",
|
||||||
readableName: "Add reactions",
|
"USE_APPLICATION_COMMANDS",
|
||||||
description: "Allows user to add reactions to messages",
|
"REQUEST_TO_SPEAK",
|
||||||
},
|
"MANAGE_EVENTS",
|
||||||
{
|
"MANAGE_THREADS",
|
||||||
name: "VIEW_AUDIT_LOG",
|
"CREATE_PUBLIC_THREADS",
|
||||||
readableName: "View audit log",
|
"CREATE_PRIVATE_THREADS",
|
||||||
description: "Allows the user to view the audit log",
|
"USE_EXTERNAL_STICKERS",
|
||||||
},
|
"SEND_MESSAGES_IN_THREADS",
|
||||||
{
|
"USE_EMBEDDED_ACTIVITIES",
|
||||||
name: "PRIORITY_SPEAKER",
|
"MODERATE_MEMBERS",
|
||||||
readableName: "Priority speaker",
|
"VIEW_CREATOR_MONETIZATION_ANALYTICS",
|
||||||
description: "Allows for using priority speaker in a voice channel",
|
"USE_SOUNDBOARD",
|
||||||
},
|
"CREATE_GUILD_EXPRESSIONS",
|
||||||
{
|
"CREATE_EVENTS",
|
||||||
name: "STREAM",
|
"USE_EXTERNAL_SOUNDS",
|
||||||
readableName: "Video",
|
"SEND_VOICE_MESSAGES",
|
||||||
description: "Allows the user to stream",
|
"SEND_POLLS",
|
||||||
},
|
"USE_EXTERNAL_APPS"
|
||||||
{
|
|
||||||
name: "VIEW_CHANNEL",
|
|
||||||
readableName: "View channels",
|
|
||||||
description: "Allows the user to view the channel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SEND_MESSAGES",
|
|
||||||
readableName: "Send messages",
|
|
||||||
description: "Allows user to send messages",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SEND_TTS_MESSAGES",
|
|
||||||
readableName: "Send text-to-speech messages",
|
|
||||||
description: "Allows the user to send text-to-speech messages",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_MESSAGES",
|
|
||||||
readableName: "Manage messages",
|
|
||||||
description: "Allows the user to delete messages that aren't their own",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "EMBED_LINKS",
|
|
||||||
readableName: "Embed links",
|
|
||||||
description: "Allow links sent by this user to auto-embed",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ATTACH_FILES",
|
|
||||||
readableName: "Attach files",
|
|
||||||
description: "Allows the user to attach files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "READ_MESSAGE_HISTORY",
|
|
||||||
readableName: "Read message history",
|
|
||||||
description: "Allows user to read the message history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MENTION_EVERYONE",
|
|
||||||
readableName: "Mention @everyone, @here and all roles",
|
|
||||||
description: "Allows the user to mention everyone",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_EXTERNAL_EMOJIS",
|
|
||||||
readableName: "Use external emojis",
|
|
||||||
description: "Allows the user to use external emojis",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "VIEW_GUILD_INSIGHTS",
|
|
||||||
readableName: "View guild insights",
|
|
||||||
description: "Allows the user to see guild insights",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CONNECT",
|
|
||||||
readableName: "Connect",
|
|
||||||
description: "Allows the user to connect to a voice channel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SPEAK",
|
|
||||||
readableName: "Speak",
|
|
||||||
description: "Allows the user to speak in a voice channel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MUTE_MEMBERS",
|
|
||||||
readableName: "Mute members",
|
|
||||||
description: "Allows user to mute other members",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "DEAFEN_MEMBERS",
|
|
||||||
readableName: "Deafen members",
|
|
||||||
description: "Allows user to deafen other members",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MOVE_MEMBERS",
|
|
||||||
readableName: "Move members",
|
|
||||||
description: "Allows the user to move members between voice channels",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_VAD",
|
|
||||||
readableName: "Use voice activity detection",
|
|
||||||
description:
|
|
||||||
"Allows users to speak in a voice channel by simply talking",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CHANGE_NICKNAME",
|
|
||||||
readableName: "Change nickname",
|
|
||||||
description: "Allows the user to change their own nickname",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_NICKNAMES",
|
|
||||||
readableName: "Manage nicknames",
|
|
||||||
description: "Allows user to change nicknames of other members",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_ROLES",
|
|
||||||
readableName: "Manage roles",
|
|
||||||
description: "Allows user to edit and manage roles",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_WEBHOOKS",
|
|
||||||
readableName: "Manage webhooks",
|
|
||||||
description: "Allows management and editing of webhooks",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_GUILD_EXPRESSIONS",
|
|
||||||
readableName: "Manage expressions",
|
|
||||||
description: "Allows for managing emoji, stickers, and soundboards",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_APPLICATION_COMMANDS",
|
|
||||||
readableName: "Use application commands",
|
|
||||||
description: "Allows the user to use application commands",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "REQUEST_TO_SPEAK",
|
|
||||||
readableName: "Request to speak",
|
|
||||||
description: "Allows user to request to speak in stage channel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_EVENTS",
|
|
||||||
readableName: "Manage events",
|
|
||||||
description: "Allows user to edit and manage events",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MANAGE_THREADS",
|
|
||||||
readableName: "Manage threads",
|
|
||||||
description:
|
|
||||||
"Allows the user to delete and archive threads and view all private threads",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CREATE_PUBLIC_THREADS",
|
|
||||||
readableName: "Create public threads",
|
|
||||||
description: "Allows the user to create public threads",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CREATE_PRIVATE_THREADS",
|
|
||||||
readableName: "Create private threads",
|
|
||||||
description: "Allows the user to create private threads",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_EXTERNAL_STICKERS",
|
|
||||||
readableName: "Use external stickers",
|
|
||||||
description: "Allows user to use external stickers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SEND_MESSAGES_IN_THREADS",
|
|
||||||
readableName: "Send messages in threads",
|
|
||||||
description: "Allows the user to send messages in threads",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_EMBEDDED_ACTIVITIES",
|
|
||||||
readableName: "Use activities",
|
|
||||||
description: "Allows the user to use embedded activities",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "MODERATE_MEMBERS",
|
|
||||||
readableName: "Timeout members",
|
|
||||||
description:
|
|
||||||
"Allows the user to time out other users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "VIEW_CREATOR_MONETIZATION_ANALYTICS",
|
|
||||||
readableName: "View creator monetization analytics",
|
|
||||||
description: "Allows for viewing role subscription insights",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_SOUNDBOARD",
|
|
||||||
readableName: "Use soundboard",
|
|
||||||
description: "Allows for using soundboard in a voice channel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CREATE_GUILD_EXPRESSIONS",
|
|
||||||
readableName: "Create expressions",
|
|
||||||
description:
|
|
||||||
"Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "CREATE_EVENTS",
|
|
||||||
readableName: "Create events",
|
|
||||||
description:
|
|
||||||
"Allows for creating scheduled events, and editing and deleting those created by the current user.",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_EXTERNAL_SOUNDS",
|
|
||||||
readableName: "Use external sounds",
|
|
||||||
description:
|
|
||||||
"Allows the usage of custom soundboard sounds from other servers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SEND_VOICE_MESSAGES",
|
|
||||||
readableName: "Send voice messages",
|
|
||||||
description: "Allows sending voice messages",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "SEND_POLLS",
|
|
||||||
readableName: "Create polls",
|
|
||||||
description: "Allows sending polls",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "USE_EXTERNAL_APPS",
|
|
||||||
readableName: "Use external apps",
|
|
||||||
description:
|
|
||||||
"Allows user-installed apps to send public responses. " +
|
|
||||||
"When disabled, users will still be allowed to use their apps but the responses will be ephemeral. " +
|
|
||||||
"This only applies to apps not also installed to the server.",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
Permissions.map = {};
|
|
||||||
let i = 0;
|
|
||||||
for(const thing of Permissions.info){
|
|
||||||
Permissions.map[i] = thing;
|
|
||||||
Permissions.map[thing.name] = i;
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getPermission(name: string): number{
|
getPermission(name: string): number{
|
||||||
if(undefined===Permissions.map[name]){
|
if(undefined===Permissions.permisions.indexOf(name)){
|
||||||
console.error(name +" is not found in map",Permissions.map);
|
console.error(name +" is not found in map",Permissions.permisions);
|
||||||
}
|
}
|
||||||
if(this.getPermissionbit(Permissions.map[name] as number, this.allow)){
|
if(this.getPermissionbit(Permissions.permisions.indexOf(name) as number, this.allow)){
|
||||||
return 1;
|
return 1;
|
||||||
}else if(
|
}else if(
|
||||||
this.getPermissionbit(Permissions.map[name] as number, this.deny)
|
this.getPermissionbit(Permissions.permisions.indexOf(name) as number, this.deny)
|
||||||
){
|
){
|
||||||
return-1;
|
return-1;
|
||||||
}else{
|
}else{
|
||||||
|
@ -315,13 +105,13 @@ class Permissions{
|
||||||
"This function may of been used in error, think about using getPermision instead"
|
"This function may of been used in error, think about using getPermision instead"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if(this.getPermissionbit(Permissions.map[name] as number, this.allow))
|
if(this.getPermissionbit(Permissions.permisions.indexOf(name) as number, this.allow))
|
||||||
return true;
|
return true;
|
||||||
if(name != "ADMINISTRATOR"&&adminOverride)return this.hasPermission("ADMINISTRATOR");
|
if(name !== "ADMINISTRATOR"&&adminOverride)return this.hasPermission("ADMINISTRATOR");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
setPermission(name: string, setto: number): void{
|
setPermission(name: string, setto: number): void{
|
||||||
const bit = Permissions.map[name] as number;
|
const bit = Permissions.permisions.indexOf(name) as number;
|
||||||
if(bit===undefined){
|
if(bit===undefined){
|
||||||
return console.error(
|
return console.error(
|
||||||
"Tried to set permission to " +
|
"Tried to set permission to " +
|
||||||
|
@ -346,5 +136,4 @@ name +
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Permissions.makeMap();
|
|
||||||
export{ Permissions };
|
export{ Permissions };
|
||||||
|
|
|
@ -170,7 +170,7 @@ class RoleList extends Buttons{
|
||||||
this.permission = new Permissions("0");
|
this.permission = new Permissions("0");
|
||||||
}
|
}
|
||||||
this.makeguildmenus(options);
|
this.makeguildmenus(options);
|
||||||
for(const thing of Permissions.info){
|
for(const thing of Permissions.info()){
|
||||||
options.options.push(
|
options.options.push(
|
||||||
new PermissionToggle(thing, this.permission, options)
|
new PermissionToggle(thing, this.permission, options)
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,111 @@
|
||||||
"en": {
|
"en": {
|
||||||
"reply": "Reply",
|
"reply": "Reply",
|
||||||
"copyrawtext":"Copy raw text",
|
"copyrawtext":"Copy raw text",
|
||||||
"copymessageid":"Copy message id"
|
"copymessageid":"Copy message id",
|
||||||
|
"permissions":{
|
||||||
|
"descriptions":{
|
||||||
|
"CREATE_INSTANT_INVITE": "Allows the user to create invites for the guild",
|
||||||
|
"KICK_MEMBERS": "Allows the user to kick members from the guild",
|
||||||
|
"BAN_MEMBERS": "Allows the user to ban members from the guild",
|
||||||
|
"ADMINISTRATOR": "Allows all permissions and bypasses channel permission overwrites. This is a dangerous permission!",
|
||||||
|
"MANAGE_CHANNELS": "Allows the user to manage and edit channels",
|
||||||
|
"MANAGE_GUILD": "Allows management and editing of the guild",
|
||||||
|
"ADD_REACTIONS": "Allows user to add reactions to messages",
|
||||||
|
"VIEW_AUDIT_LOG": "Allows the user to view the audit log",
|
||||||
|
"PRIORITY_SPEAKER": "Allows for using priority speaker in a voice channel",
|
||||||
|
"STREAM": "Allows the user to stream",
|
||||||
|
"VIEW_CHANNEL": "Allows the user to view the channel",
|
||||||
|
"SEND_MESSAGES": "Allows user to send messages",
|
||||||
|
"SEND_TTS_MESSAGES": "Allows the user to send text-to-speech messages",
|
||||||
|
"MANAGE_MESSAGES": "Allows the user to delete messages that aren't their own",
|
||||||
|
"EMBED_LINKS": "Allow links sent by this user to auto-embed",
|
||||||
|
"ATTACH_FILES": "Allows the user to attach files",
|
||||||
|
"READ_MESSAGE_HISTORY": "Allows user to read the message history",
|
||||||
|
"MENTION_EVERYONE": "Allows the user to mention everyone",
|
||||||
|
"USE_EXTERNAL_EMOJIS": "Allows the user to use external emojis",
|
||||||
|
"VIEW_GUILD_INSIGHTS": "Allows the user to see guild insights",
|
||||||
|
"CONNECT": "Allows the user to connect to a voice channel",
|
||||||
|
"SPEAK": "Allows the user to speak in a voice channel",
|
||||||
|
"MUTE_MEMBERS": "Allows user to mute other members",
|
||||||
|
"DEAFEN_MEMBERS": "Allows user to deafen other members",
|
||||||
|
"MOVE_MEMBERS": "Allows the user to move members between voice channels",
|
||||||
|
"USE_VAD": "Allows users to speak in a voice channel by simply talking",
|
||||||
|
"CHANGE_NICKNAME": "Allows the user to change their own nickname",
|
||||||
|
"MANAGE_NICKNAMES": "Allows user to change nicknames of other members",
|
||||||
|
"MANAGE_ROLES": "Allows user to edit and manage roles",
|
||||||
|
"MANAGE_WEBHOOKS": "Allows management and editing of webhooks",
|
||||||
|
"MANAGE_GUILD_EXPRESSIONS": "Allows for managing emoji, stickers, and soundboards",
|
||||||
|
"USE_APPLICATION_COMMANDS": "Allows the user to use application commands",
|
||||||
|
"REQUEST_TO_SPEAK": "Allows user to request to speak in stage channel",
|
||||||
|
"MANAGE_EVENTS": "Allows user to edit and manage events",
|
||||||
|
"MANAGE_THREADS": "Allows the user to delete and archive threads and view all private threads",
|
||||||
|
"CREATE_PUBLIC_THREADS": "Allows the user to create public threads",
|
||||||
|
"CREATE_PRIVATE_THREADS": "Allows the user to create private threads",
|
||||||
|
"USE_EXTERNAL_STICKERS": "Allows user to use external stickers",
|
||||||
|
"SEND_MESSAGES_IN_THREADS": "Allows the user to send messages in threads",
|
||||||
|
"USE_EMBEDDED_ACTIVITIES": "Allows the user to use embedded activities",
|
||||||
|
"MODERATE_MEMBERS": "Allows the user to time out other users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels",
|
||||||
|
"VIEW_CREATOR_MONETIZATION_ANALYTICS": "Allows for viewing role subscription insights",
|
||||||
|
"USE_SOUNDBOARD": "Allows for using soundboard in a voice channel",
|
||||||
|
"CREATE_GUILD_EXPRESSIONS": "Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.",
|
||||||
|
"CREATE_EVENTS": "Allows for creating scheduled events, and editing and deleting those created by the current user.",
|
||||||
|
"USE_EXTERNAL_SOUNDS": "Allows the usage of custom soundboard sounds from other servers",
|
||||||
|
"SEND_VOICE_MESSAGES": "Allows sending voice messages",
|
||||||
|
"SEND_POLLS": "Allows sending polls",
|
||||||
|
"USE_EXTERNAL_APPS": "Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server."
|
||||||
|
},
|
||||||
|
"readableNames":{
|
||||||
|
"CREATE_INSTANT_INVITE": "Create invite",
|
||||||
|
"KICK_MEMBERS": "Kick members",
|
||||||
|
"BAN_MEMBERS": "Ban members",
|
||||||
|
"ADMINISTRATOR": "Administrator",
|
||||||
|
"MANAGE_CHANNELS": "Manage channels",
|
||||||
|
"MANAGE_GUILD": "Manage guild",
|
||||||
|
"ADD_REACTIONS": "Add reactions",
|
||||||
|
"VIEW_AUDIT_LOG": "View audit log",
|
||||||
|
"PRIORITY_SPEAKER": "Priority speaker",
|
||||||
|
"STREAM": "Video",
|
||||||
|
"VIEW_CHANNEL": "View channels",
|
||||||
|
"SEND_MESSAGES": "Send messages",
|
||||||
|
"SEND_TTS_MESSAGES": "Send text-to-speech messages",
|
||||||
|
"MANAGE_MESSAGES": "Manage messages",
|
||||||
|
"EMBED_LINKS": "Embed links",
|
||||||
|
"ATTACH_FILES": "Attach files",
|
||||||
|
"READ_MESSAGE_HISTORY": "Read message history",
|
||||||
|
"MENTION_EVERYONE": "Mention @everyone, @here and all roles",
|
||||||
|
"USE_EXTERNAL_EMOJIS": "Use external emojis",
|
||||||
|
"VIEW_GUILD_INSIGHTS": "View guild insights",
|
||||||
|
"CONNECT": "Connect",
|
||||||
|
"SPEAK": "Speak",
|
||||||
|
"MUTE_MEMBERS": "Mute members",
|
||||||
|
"DEAFEN_MEMBERS": "Deafen members",
|
||||||
|
"MOVE_MEMBERS": "Move members",
|
||||||
|
"USE_VAD": "Use voice activity detection",
|
||||||
|
"CHANGE_NICKNAME": "Change nickname",
|
||||||
|
"MANAGE_NICKNAMES": "Manage nicknames",
|
||||||
|
"MANAGE_ROLES": "Manage roles",
|
||||||
|
"MANAGE_WEBHOOKS": "Manage webhooks",
|
||||||
|
"MANAGE_GUILD_EXPRESSIONS": "Manage expressions",
|
||||||
|
"USE_APPLICATION_COMMANDS": "Use application commands",
|
||||||
|
"REQUEST_TO_SPEAK": "Request to speak",
|
||||||
|
"MANAGE_EVENTS": "Manage events",
|
||||||
|
"MANAGE_THREADS": "Manage threads",
|
||||||
|
"CREATE_PUBLIC_THREADS": "Create public threads",
|
||||||
|
"CREATE_PRIVATE_THREADS": "Create private threads",
|
||||||
|
"USE_EXTERNAL_STICKERS": "Use external stickers",
|
||||||
|
"SEND_MESSAGES_IN_THREADS": "Send messages in threads",
|
||||||
|
"USE_EMBEDDED_ACTIVITIES": "Use activities",
|
||||||
|
"MODERATE_MEMBERS": "Timeout members",
|
||||||
|
"VIEW_CREATOR_MONETIZATION_ANALYTICS": "View creator monetization analytics",
|
||||||
|
"USE_SOUNDBOARD": "Use soundboard",
|
||||||
|
"CREATE_GUILD_EXPRESSIONS": "Create expressions",
|
||||||
|
"CREATE_EVENTS": "Create events",
|
||||||
|
"USE_EXTERNAL_SOUNDS": "Use external sounds",
|
||||||
|
"SEND_VOICE_MESSAGES": "Send voice messages",
|
||||||
|
"SEND_POLLS": "Create polls",
|
||||||
|
"USE_EXTERNAL_APPS": "Use external apps"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ru": "./ru.json"
|
"ru": "./ru.json"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue