Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
USERSATOSHI committed Jun 25, 2023
1 parent 9a27f50 commit d679aa8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/functions/discord/client/$ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const $ping: FunctionData = {

const ping = "__$DISCORD_DATA$__.client.ws.data.ping";

const res = escapeResult(`(${ping})`);
const res = escapeResult(`${ping}`);
currentScope.update(res, data);
return {
code: res,
Expand Down
10 changes: 4 additions & 6 deletions src/functions/discord/message/$description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const $description: FunctionData = {

currentScope.setters += escapeResult(
`${escapeVars(
currentScope.name,
)}_embeds[${index}] = { fields: [] };`,
currentScope.name + "_embeds",
)}[${index}] = { fields: [] };`,
);
}

Expand All @@ -64,10 +64,8 @@ export const $description: FunctionData = {

const res = escapeResult(
`${escapeVars(
currentScope.name,
)}_embeds[${index}].description = ${parseString(
actualDescription,
)};`,
currentScope.name + "_embeds",
)}[${index}].description = ${parseString(actualDescription)};`,
);

currentScope.update(res, data);
Expand Down
8 changes: 4 additions & 4 deletions src/functions/discord/message/$title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const $title: FunctionData = {

currentScope.setters += escapeResult(
`${escapeVars(
currentScope.name,
)}_embeds[${index}] = { fields: [] };`,
currentScope.name + "_embeds",
)}[${index}] = { fields: [] };`,
);
}

Expand All @@ -64,8 +64,8 @@ export const $title: FunctionData = {

const res = escapeResult(
`${escapeVars(
currentScope.name,
)}_embeds[${index}].title = ${parseString(actualTitle)};`,
currentScope.name + "_embeds",
)}[${index}].title = ${parseString(actualTitle)};`,
);

currentScope.update(res, data);
Expand Down
4 changes: 2 additions & 2 deletions src/functions/discord/user/$userAvatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export const $userAvatar: FunctionData = {

const [id,size=1024,dynamic=true,format="'png'"] = data.splits;

const avatar = `(await __$DISCORD_DATA$__.bot.util.getUser(${id}))?.avatarUrl({size: ${size}, dynamic: ${dynamic}, format: ${format} })`;
const avatar = `(await __$DISCORD_DATA$__.bot.util.getUser(${id}))?.avatarUrl({size: ${size}, dynamic: ${dynamic}, format: ${format} }`;

const res = escapeResult(`(${avatar})`);
const res = escapeResult(`${avatar}`);
currentScope.update(res, data);
return {
code: res,
Expand Down

0 comments on commit d679aa8

Please sign in to comment.