# Copy, Forward message

{% tabs %}
{% tab title="TypeScript" %}


```typescript
import { DegreetTelegram } from 'degreet-telegram'
import { IContext } from 'degreet-telegram/src/types'

const token: string = 'Enter your token here'
const bot: DegreetTelegram = new DegreetTelegram(token)

bot.on('text', async (ctx: IContext): Promise<any> => {
  try {
    await ctx.answer.copy(ctx.sender.id)
    await ctx.answer.forward(ctx.sender.id)
  } catch (e: any) {
    console.error(e)
  }
})

bot.start().then((username: string): void => {
  console.log(`Started on @${username}`)
})
```
{% endtab %}

{% tab title="JavaScript" %}
```javascript
const { DegreetTelegram } = require('degreet-telegram')

const token = 'Enter your token here'
const bot = new DegreetTelegram(token)

bot.on('text', async (ctx) => {
  try {
    await ctx.answer.copy(ctx.sender.id)
    await ctx.answer.forward(ctx.sender.id)
  } catch (e) {
    console.error(e)
  }
})

bot.start().then((username) => {
  console.log(`Started on @${username}`)
})
```
{% endtab %}
{% endtabs %}
