Hi today i came beceaue i have an error of encoding with your configs with two example one who works with no error one who are glitch. With my code of course.
Thanks for your help <3
const{Client,GatewayIntentBits}=require('discord.js');constclient=newClient({intents:[GatewayIntentBits.Guilds,GatewayIntentBits.GuildMessages,GatewayIntentBits.MessageContent,GatewayIntentBits.GuildMembers,],});constaxios=require("axios");constPromise=require("bluebird");constgetJson=require("axios-get-json-response");client.on('messageCreate',async(message)=>{if(message.content.startsWith('!doge')){consta=Math.random()*(5-0)+1varb=parseInt(a);console.log(b)const{data}=awaitaxios.get(`https://dogechain.info/chain/Dogecoin/q/addressbalance/DQzs4yzLoR3UJ3YdCRSD7eEeW3kv5gdca2`);Promise.try(()=>{returnaxios.get("https://api.coingecko.com/api/v3/simple/price?ids=dogecoin&vs_currencies=usd",getJson.axiosConfiguration).then((response)=>{console.log(response)letparsedJsonbalance=getJson.parse(response);constdataprice=(parsedJsonbalance.totalAssetInUsd)constcheckprice=data*datapricemessage.reply(`Le solde du wallet dogecoin simcash est ${checkprice}usd`)if(b==5){message.reply(`N'hésitez pas a mettre mon code d'affiliation simcash XMHX3 cela me soutiens énormement <3 clarity`)}})})}})client.on('messageCreate',async(message)=>{if(message.content.startsWith('!usdt')){consta=Math.random()*(5-0)+1varb=parseInt(a);console.log(b)Promise.try(()=>{returnaxios.get("https://apilist.tronscanapi.com/api/account/token_asset_overview?address=TTiLvHXVBRHuF6xDP6Y3tZs5XPvkpYSReA",getJson.axiosConfiguration);}).then((response)=>{console.log(response)letparsedJsonbalance=getJson.parse(response);constdata=(parsedJsonbalance.totalAssetInUsd)console.log(data)message.reply(`Le solde du wallet Usdt Tron simcash est ${data} usd`)if(b==5){message.reply(`N'hésitez pas a mettre mon code d'affiliation simcash XMHX3 cela me soutiens énormement <3 clarity`)}})}})
Hi today i came beceaue i have an error of encoding with your configs with two example one who works with no error one who are glitch. With my code of course.
Thanks for your help <3
```js
const { Client,GatewayIntentBits} = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
});
const axios = require("axios");
const Promise = require("bluebird");
const getJson = require("axios-get-json-response");
client.on('messageCreate', async (message) => {
if (message.content.startsWith('!doge')){
const a = Math.random() * (5-0) + 1
var b = parseInt(a);
console.log(b)
const { data } = await axios.get(
`https://dogechain.info/chain/Dogecoin/q/addressbalance/DQzs4yzLoR3UJ3YdCRSD7eEeW3kv5gdca2`
);
Promise.try(() => {
return axios.get("https://api.coingecko.com/api/v3/simple/price?ids=dogecoin&vs_currencies=usd", getJson.axiosConfiguration).then((response) => {
console.log(response)
let parsedJsonbalance = getJson.parse(response);
const dataprice = (parsedJsonbalance.totalAssetInUsd)
const checkprice = data * dataprice
message.reply(`Le solde du wallet dogecoin simcash est ${checkprice}usd`)
if (b == 5) {
message.reply(`N'hésitez pas a mettre mon code d'affiliation simcash XMHX3 cela me soutiens énormement <3 clarity`)
}
})})}})
client.on('messageCreate', async (message) => {
if (message.content.startsWith('!usdt')){
const a = Math.random() * (5-0) + 1
var b = parseInt(a);
console.log(b)
Promise.try(() => {
return axios.get("https://apilist.tronscanapi.com/api/account/token_asset_overview?address=TTiLvHXVBRHuF6xDP6Y3tZs5XPvkpYSReA", getJson.axiosConfiguration);
}).then((response) => {
console.log(response)
let parsedJsonbalance = getJson.parse(response);
const data = (parsedJsonbalance.totalAssetInUsd)
console.log(data)
message.reply(`Le solde du wallet Usdt Tron simcash est ${data} usd`)
if (b == 5) {
message.reply(`N'hésitez pas a mettre mon code d'affiliation simcash XMHX3 cela me soutiens énormement <3 clarity`)
}
})}})
```
Hi today i came beceaue i have an error of encoding with your configs with two example one who works with no error one who are glitch. With my code of course.
Thanks for your help <3