TypeError: advance.randomID is not a function

heres the code of my main file (index.js)

require("./start")
const Discord = require('discord.js')
const client = new Discord.Client()

client.on('message', message => {
function sendmsg(message) {
    message.channel.send(message)
}

});

function randomID() {
  // Returns a random ID
  char = 'J97DS97+_$}{cx:{$#}A+C}$|{%A$}EraAE{RX@@@2{@}{%}G@{#QB}&V{%}C{VYS}#"^EA}'
  char[Math.floor(Math.random() * char.length)];
}

and heres my code of start.js file

const Discord = require('discord.js')
const client = new Discord.Client()
const advance = require('./index.js')
client.on('message', message => {
if(message.content == '&randomId' {
message.channel.send(advance.randomID())
}
});

now i what wanna do is to send a random id from a string called char
so i want to run a function from a file called index.js
but it says TypeError: advance.randomID is not a function
can you please help me Thanks in advance!