This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Java JDA discord file / variable manipulation  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, so I'm attempting to make a discord bot.
using the JDA
https://github.com/DV8FromTheWorld/JDA/tree/master/src/main/java/net/dv8tion/jda/core  <== link to jda


This is my class thet is called on a message being revieved



And this is what im trying to do:



My end goal is to make a file with the author's name
in my case that is: String Author = e.getAuthor().getId();

I dont seem to understand what im doing wrong, console throws me a  "dumblefloor.DumbleBot.FileMaker@3b8c070e"
 
Sheriff
Posts: 5813
150
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like FileMaker is your own class and you haven't overridden the toString() method.  What were you expecting?
 
Bartender
Posts: 690
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I can tell, e.getAuthor().getId() returns a unique ID, not the name of the author. Is that what you want? Or do you want e.getAuthor().getName() ?
 
pie. tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!